Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Switch Applications From The Command Line With Apple's osascript

You can open and/or swith to an application from the command line using Apple's [TODO: Code shorthand span ] tool to run either javascript or apple script.

The javascript looks like this :

bash
osascript -l JavaScript -e "Application('Sublime Text').activate()"

And the apple script version looks like this :

bash
osascript -e 'tell application "Sublime Text"' -e 'activate' -e 'end tell'

In some cases, you'll need to use the full path to the app