Use TextExpander To Run Shell Scripts

Use TextExpander To Run Shell Scripts

TextExpander is great for saving time writing repetitive text.  However, I recently discovered that you can also run scripts via a TextExpander keystroke.  To do this, create a new snippet and choose Shell Script as the Content type.  Then type your script in.

In the example below, I create a simple script that makes the computer talk, so I know that the script works.  All I need to do is type ;script and then Tab and it will make the computer run my script.

You can make the abbreviation be whatever you want.  You could use this as a covert way of self-destructing your data.  Or you could have it run a AppleScript that clicks GUI buttons for you.  You can even use the keyboard shortcut on an area that doesn’t have a text-field; it will still trigger the script!

TextExpander is a paid product, but once you use it, you won’t be able to live without it.