How to use TextExpander to grab your location and enter it into a document
Last week, Smile Software shared a great tip for using TextExpander to pull down your GPS coordinates so you can use them in any app. The snippet takes advantage of TextExpander's ability to run AppleScript when you call up the script using a TextExpander keyboard shortcut.
Before you can use the TextExpander snippet, you must download and install the Location Helper app from David Blishen. Location helper brings OS X's Core Location to AppleScript, allowing you to pull down your current location, altitude and geocode address. Location Helper is an agent that runs in the background and has no user interface.
To get TextExpander, Location Helper and AppleScript to work together nicely, here is what you need to do:
2. Download Location Helper for AppleScript from the Mac App Store.
3. Launch Location Helper. You need to launch it once in order to give the app permission to access your location.
4. Create a new TextExpander snippet by opening TextExpander and clicking the "+ New Snippet" button.
5. At the top of the new snippet dialog, Select "Content: Plain Text" and change it to "AppleScript."
6. In the content editor section, paste in the following AppleScript:
tell application "Location Helper"
set listCoords to get location coordinates
set clocationrecord to get location altitude
return "My coordinates are " & (item 1 of listCoords as text) & ", " & (item 2 of listCoords as text) & " and my altitude is " & (clocationrecord as text)
7. Set the abbreviation of the snippet to a keyboard shortcut of your choice. I choose ";loc" as that is easy to remember and fits into my workflow.
8. Open your favorite text editor and type your abbreviation to see how it works.
Feel free to edit your AppleScript as needed using these Location Helper examples from Blishen. If you have any other cool uses of TextExpander and AppleScript, please share them in the comments.
Subscribe to Newsletter
Software Updatesmore updates
- Daily App: MyScript Calculator solves your hand-written math equations
- Findery app lets you discover the world around you using annotated notes and maps
- The Learnist app brings its crowd-sourced collection of information to your iPhone
- My cat Cinnamon reviews Friskies Cat Fishing 2
- Photo Grid Collage Maker is capable and free
- iExit gets new features and is now free