Automator Topics

Image Capture Plugin: These workflows are available from within the Image Capture app. Dictation Commands: You can create workflows that are triggered by specific dictation commands.

15 Automator and AppleScripts You Can’t Live Without

The first is a service that will allow you to select any word or phrase you come across and look up its meaning in Wikipedia. A sheet will open displaying the type of workflows you can create. The basic Automator layout. The sidebar can contain either Actions or Variables, depending on which item is selected in the toolbar just above the sidebar. Since you selected Services, AppleScript automatically prepended an action at the very beginning, which states that the service receives selected text in any application.


  • format external hard drive for mac and pc windows 7!
  • Automator: Learn.
  • Popular Topics.

This allows you to highlight any text in any application, and have the text sent to the next action in the workflow. Select Utilities in the first sidebar column. The first column is used as a filter for what appears in the second column. You can also select Library in the first column, and all possible actions will appear in the second column. The Run AppleScript action filled in with the code to retrieve information from the Wikipedia website.

So far, we have a service that will grab the text you highlight in any application and send it off to Wikipedia to be looked up. The results of that lookup will be passed to the next action we attach. Automator will show the two actions as connected, with a chevron from the Run AppleScript action pointing to the Website Popup item.

The Website Popup item will display the results of the Wikipedia search in a scrollable popup window. You can set the size of the popup window, its position on your display, the user agent the browser type that is used to query the Wikipedia site , and the Output.

Linked: A Collection of 70+ Automator Actions, Workflows and Tutorials – MacStories

Unfortunately, Services takes input from outside of Automator, so we must add an action at the beginning to provide text to the service. When the green plus sign appears, you can drop the Get Specific Text. In the Get Specific Text item, enter the text you would like to have looked up on Wikipedia. The workflow you created will be run and a popup window should open with information about Automator from the Wikipedia website.

Just below the popup window will be OK and Cancel buttons. With the test complete, you can remove the Get Specific Text action from the workflow by clicking the close X button in the top right corner of the action. Select File, Save, and then enter a name for the service. Keep the name short but descriptive. Other Lookup Services By just changing the entry in the Run AppleScript action, you can change the site used to look up information.

Here are three additional sites, along with the change to the Run AppleScript action needed. Resize Images Our second example will be creating an application to resize images. The completed resize images workflow Can take either a single file or a folder full of images, make a copy of them to make sure the originals are unchanged, and then resize the copies, leaving the newly resized images in a specified folder.


  • euro truck simulator 2 mac english!
  • how to create a technic mod pack mac.
  • 15 Automator and AppleScripts You Can’t Live Without | TechRadar;

Launch Automator, select New from the File menu, and then select Application as the type of workflow to create. Click the Choose button. In the Copy Finder Items action, use the dropdown menu to select Other, then either navigate to a folder you wish to use to store the images that will be resized, or click the New Folder button to create a new location to store the results of the workflow.

In the Sidebar, select Photos from the first column, and then from the second column, drag Scale Images to the workflow pane. In the field, enter either the percentage to scale by, or the number of pixels wide the photo should be scaled to. From the File Menu, select Save. Give the workflow a descriptive name.

You may want to include the size or percentage the app will adjust an image to, such as Resize , or Resize 70p. Be sure to choose a good location to save this workflow to. I put mine on the Desktop, where I can drag any image or folder of images onto the app to have them automatically resized. You can create multiple versions of this workflow, each for different sizes to resize the images to. There is no action called Paste from Clipboard. What are you going to do? One option is to record the events of pasting text into TextWrangler, but why would you do that when you can use AppleScript?

Search and drag Run AppleScript from the actions list to the current workflow below Launch Application. Modify the code to the following:. This makes sure sure your chosen text editor is running and is the active window before pasting your text. Now go to File , Save and select the name you wish to appear in your services list.

Next, either right-click on the text or go up to the menu bar, select Xcode.

Automator for Mac OS X: Tutorial and Examples

In the Services menu you should now see your new service. Go ahead and run it. This makes a new document with Command-N, waits half a second, then pastes the text into the new document. Experiment with what best suits your needs! Apple woke up to the fact that preparing images for iOS development can result in poor quality images, so they have included the asset catalog in iOS 7 to make it easier to track image assets. Imagine how much easier image processing will be!

You can easily make one yourself with Automator. There are a few ways to do this, but try using Folder Actions first. They allow you to set up a folder that runs a specific workflow on every file placed within. Open Automator and select New to create a new project. Select Folder Action and click Choose. From the dropdown menu select Other… and go to the location you want your folder. Open this folder via finder and add two more folders in it, one called Processed the other called Processed 2x , this is where photos will go after processing.

Your folder structure should now look like: Go back to the Automator project and add the Copy Finder Items action from the library to the workflow. In the To: From your library add the action called Rename Finder Items.

Script your own actions

Make sure the dropdown box at the top of the action is set to Add Text. In the Add: Note that there is a small text label below this section which gives you an example of how the filename will look after this modification:. Use the checkboxes to enable or disable folder actions, as well as the individual scripts.

How simple is that? Work through this next exercise to make it work with a single workflow, and focus on learning about variables. You can drag each of these onto the workflow so its value is accessed via the output. Back in Automator in your current folder action project, add the Set Value of Variable action to your workflow at the top above Copy Finder Items. Click New Variable… from the dropdown list and name it Original Input.

MAC OS X Automator from workflow to application

Your workflow should now look like this:. Now that the original filename is stored in a variable, you need to retrieve it from the variable after finishing with the 2x version. Find Get Value of Variable from the actions list, drag it onto the bottom of your workflow, and make sure the Variable selected is Original Input. All actions on the workflow return an output. To fix this, you can disconnect an action from previous outputs.

Now you can finish this up by adding another Copy Finder Items action under the Get Value of Variable action and setting it to your Processed folder. In your Processed folder, file names are unchanged. Well done! You now have full control over your image assets. Besides working with Retina, you can use this same process to prep images for iPad, iPhone and iWhatever. To do this, all you need is the ration or change for each device, and a single high resolution image.

Beyond that, you can even automate actions for photo manipulation. For example, you can add filters, like posterize and vignette. If you need to use a database within your app, the most likely format is SQLite. Using Automator can make managing the database more efficient. In Automator, select File from the menu bar and then New. Note that one is included in the sample files for this tutorial.

Drag a Execute SQL action onto your workflow. This can run any SQL you want on the database. When this action runs, its output will be the result of the query. Click the Run button at the top right to see what happens. Feel free to experiment with the View Results action to fully understand what the output of each action is. For example if you were to drag it above Execute SQL , the result would be something like:. The output of the Get Specified Finder Items action will be the filepaths of all files included in the action.

You could use a Folder Action to handle this, but the sample project requires you to work with multiple files of different natures, specifically a CSV file and a SQLite database. Applications are just like every other application in your applications folder. They are single files which can take an input by drag and dropping a file or folder onto them:. The idea is your app will be a names database for smart people, so you need a table to store names.

What is Automator?

This query will create your table with the name people and will contain two fields: Now that you have added the People table to your database, you can create an application to automate adding CSV data. In Automator, go to File then New from the menu bar. This time, select Application. They are text files where each line represents a new row of data and a comma separates each field.

The one located in the sample file looks something like this: The CSV file will pass in as the first output to connect to. Next, you need to add a few actions to format the text, convert it to SQL and store it in a variable. The first action to add is Combine Text Files: This is necessary in case you drag multiple CSV files into the application; it will loop through the contents of each text file and combine everything into one.

Enter the following SQL on each:. If you were to run this action on the sample names.