Keyboard Maestro (KM) is a popular and capable OS X application for scripting system and application events. I find it easier to use than Automator, AppleScript editors, or some other alternatives.
If you ever need to call a KM macro from within a JSL script, you may find this user-defined function useful.
I currently use it with KM to control Numbers (spreadsheet application) from within JMP.