上QQ阅读APP看书,第一时间看更新
Triggering an AppleScript or shell script
The AppleScript option provides you with a field in which to add any text that will run as AppleScript, and the Shell Command option will enable you to run any Unix script and specify its arguments (there is an option to pause the code until the shell script has finished, or it can be fired off and left to execute while the program continues to run). In order to run a shell script, you'll have to set permissions on it first, with the following input to Terminal:
chmod 755 myScript
There's much more on working with Terminal in Chapter 19: Deploying Third - Party Code.