Get The Location Of Your Mac Using TextExpander | Cult of Mac

Get The Location Of Your Mac Using TextExpander


Core Location to AppleScript


We know how to grab our location in plain text on the iPad, using Editorial and some Python voodoo (Python Voodoo could be a great name for a band). But what about the Mac? Easy. Using TexExpander and some AppleScript, you can easily turn a few keystrokes into longitude and latitude, without too much attitude (Python Voodoo will be a and 8-bit rap band).

The full instructions are over at the TextExpander blog, so I won’t waste pixels by pasting them in here other than showing you just how simple is the Applescript that TextExpander needs to run for you:

tell application "Location Helper"
    set listCoords to get location coordinates
    return (item 1 of listCoords as text) & ", " & (item 2 of listCoords) as text
end tell

That, along with a free app called Location Helper for AppleScript (which gives Applescripts access to Core Location), is it. Neat, and trigger-able just by typing out a TextExpander abbreviation.

You might also have noticed that this means you can trigger pretty much any Applescript using TextExpander, and have the results fill out sections of your expanded snippets. Powerful stuff, and yet another reason to buy the amazing TextExpander. If you really needed another reason.

Source: Smile Software Blog


Daily round-ups or a weekly refresher, straight from Cult of Mac to your inbox.

  • The Weekender

    The week's best Apple news, reviews and how-tos from Cult of Mac, every Saturday morning. Our readers say: "Thank you guys for always posting cool stuff" -- Vaughn Nevins. "Very informative" -- Kenly Xavier.