One of the best hidden weapons of Mac OS X is Automator, which lets you create a remarkable variety of services and automations working perfectly in conjunction with Actions.
Today we will explain you how to compress files and folders with a tap of Actions using Automator's Services.
To set up this you will required to:
1 - use automator to create a dynamic service
2 - assign a shortcut to it in system preferences,
3 - create an action for this shortcut in Actions.
Let's see how to do this in detail...
1 - Create a dynamic service in Automator
First open Automator, go to File > New, then select "Service" selecting the gear Icon.
You will enter in the creation window of Automator.
Select Files & Folders in the left column, then "Create Archive".
Drag "Create Archive", or double click on it, in the main panel.
In the upper drop-downs you should have this string:
Service receives selected "files or folders" in "any application".
In the node options set up "Same name as input" (just leave unchanged the pre-filled field) and
"Same Folder as input" as location (but you can choose also whatever fixed path you want)
Ignore unreadable items: leave it unchecked
Now go to File > Save.. and choose the name you like, in this example we will choose "Archive selected items"
Once you saved your Service, you are done with Automator. Let's close it.
2 - Assign a shortcut in System Preferences
Now go in OS X System Preferences > Keyboard, and go to the Keyboard Shortcuts tab.
In the left column select Services, then scroll in the right column until you find the Files and Folder section,
you will find the previously saved "Archive selected items" listed here. Select, then click on the button "add shortcut".
Now an empty field will appear, perform the shortcut you like on your keyboard.
It this example we will choose crtl + command + shift + alt + C.
NOTE! - I suggest you to create an unusual combination to avoid overriding other shortcuts already in use in Finder, note that if you perform an existing shortcut you will not be warned that it already exist!).
3 - Create a new touchpad in Actions
Now open Actions, create a new touchpad in your Finder magnetized Set (or differently just add Finder as target),
then assign to this touchpad the shortcut you've just selected in OS X, in this case it will be ctrl + shift + alt + C.
You are done! Instant compression! :)
If you need more information about creating actions head to this link:
Editing Sets and Actions