Here’s an interesting Automator service for quickly accessing a map showing the origination location of an image file selected in the Finder. The interactive map will be displayed in a floating HUD window in the Finder.
TIP: Don’t want to read the following tutorial? Watch this movie instead!
The Service Workflow
This service workflow is composed of a series of Automator actions, each of which is described in detail below. You can construct the workflow if you wish, or use the completed copy provided later on this webpage.
1 Data Input Bar (⬇ see below ) • The first step in creating any Automator service is to set the parameters of the data input bar at the top of the workflow document window. Set the input data type by selecting “image files” from the input types popup menu 1 , and then select the Finder application from the target application 2 popup menu.
2 Run AppleScript Action • The default Automator library does not contain an action for extracting the latitude and longitude attributes from the embedded metadata of an image file. So, for the purposes of this workflow, we’ll use an AppleScript script to derive the location coordinates of the selected image and use those coordinates to construct a map search URL that is passed to the following action in the workflow.
The script contains two script handlers: the run handler 3 accepts and processes the data passed from the service as input to the action; and a specialized sub-routine 4 for extracting the location data from an image file and using it to create a map search URL.
<-- Access the script by clicking this button
3 Website Popup Action (⬆ see above ) The default Automator library contains an action for displaying a URL in a floating HUD palette. You can indicate a custom size for the window by choosing Custom from the Site Size popup menu 6 and then entering the width and height for the window in the size input fields 7 . The window can be automatically centered in the screen during display by selecting Centered from the Postion popup menu located just below the size input fields.
For the purposes of this workflow, set the value of the User Agent popup menu 8 to be Safari, and set the value of the action Output popup menu 8 to be the Current URL displayed in the floating window. If the service user clicks the OK button (instead of the Cancel button) located at the bottom right the window, the URL of the webpage currently displayed in the window will be passed to the next action.
4 Display Webpages action (⬆ see above ) This action will open the URL(s) passed to it, in new Safari browser windows or tabs.
Install the Service
For your convenience, we’ve provided a completed copy of the service workflow for you to download and install.
DO THIS ►DOWNLOAD the ZIP archive containing the service workflow file. Right-click the selected workflow file and choose Open from the contextual menu (⬇ see below )
DO THIS ►In the forthcoming security prompt dialog, click the Install button (⬇ see below )
The service workflow file will be moved to the Services folder in your home Library folder and be activated for use. A confirmation dialog will appear (⬇ see below )
Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. MACOSXAUTOMATION.COM assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. MACOSXAUTOMATION.COM provides this only as a convenience to our users. MACOSXAUTOMATION.COM has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and MACOSXAUTOMATION.COM assumes no responsibility in this regard. Please understand that a third-party site is independent from MACOSXAUTOMATION.COM and that MACOSXAUTOMATION.COM has no control over the content on that website. Please contact the vendor for additional information.