Latest in How-to

Image credit:

How to use TextExpander to grab your location and enter it into a document

Sponsored Links

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:

1. Download TextExpander from Smile's website or from the Mac App Store.

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)

end tell

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.

In this article: how-to, howto, location, OS X, TextExpander
All products recommended by Engadget are selected by our editorial team, independent of our parent company. Some of our stories include affiliate links. If you buy something through one of these links, we may earn an affiliate commission.
Comment
Comments
Share
Tweet
Share

Popular on Engadget

Google's new emulator makes Android Automotive development easier

Google's new emulator makes Android Automotive development easier

View
Watch the final 'Star Wars: The Rise of Skywalker' trailer

Watch the final 'Star Wars: The Rise of Skywalker' trailer

View
What's on TV this week: 'The Outer Worlds'

What's on TV this week: 'The Outer Worlds'

View
Adobe may reveal Illustrator for iPad in November

Adobe may reveal Illustrator for iPad in November

View
NVIDIA's EGX supercomputer tech can crunch 1.6 terabytes a second

NVIDIA's EGX supercomputer tech can crunch 1.6 terabytes a second

View

From around the web

Page 1Page 1ear iconeye iconFill 23text filevr