A Mac sysadmin, documenting useful code, ideas, & guides.

Automator is not dead yet

· Read in about 2 min · (295 Words)
automation

Intro

Automator is unique in its ability of creating “automation” via the usage of a graphical tasked based workflow. Most other tools that I use for automation are command line driven. So what can you do that’s so amazing?

  • Create applications. No really Automator has the ability to create a .app.
  • Create services. The ability to directly apply changes inside of applications.
  • It is easy! No advanced computer skills are needed, however scripting languages are a great addition.

Services

Creating a service is relatively simple. Below is the process of creating a service that removes spaces from files. When working with web servers the space character is encoded as “%20”. This annoys me and looks ugly. As such, I remove all spaces and replace them with underscores prior to uploading to a web site.

  1. Open Automator.

  2. Create a new Service.

  3. Change the “Service receives selected” to “files or folders” and leave “any application”.

  4. Search for “Rename” in the Library. Drag “Rename Finder Items” into the workflow.

  5. If you see the following pop-up select “Don’t Add”

  6. Modify the workflow to match the following settings. The Find field has a single space character typed.

  7. Save and name your service. This service will live in ~/Library/Services/.

To run a service simply right click on a single file or group of files and select the service. This will work on Folders as well.

My Services

Below are the services that I use frequently. To install these simply downloading, unzip, and double click on the .workflow file. A prompt to install will be be presented.

Conclusion

Services are quite powerful and can end up saving quite a bit of time. Services are not only limited to Finder and can be expanded to pretty much all applications.

Comments