X

Use AppleScript Menu to run shell and Perl scripts

Use AppleScript Menu to run shell and Perl scripts

CNET staff
Regarding the ability to create a double-clickable Terminal script (see previous item), Scott Lahteine notes that:

AppleScript Menu can do more than just run AppleScripts. It allows you to run Perl scripts and Shell scripts just as easily! Any shell-based scripting language will work.

Shell scripts and Perl scripts placed in AppleScript Menu's Scripts Folder appear as documents with # on them to denote a shell script. Shell scripts don't require any extension (.sh or .pl for example), but the scripts themselves should start with #!/bin/sh or #!/bin/perl or whatever shabang is appropriate.

Scripts started from AppleScript Menu don't invoke Terminal, so there's no wait while the Terminal loads. But since there's no terminal, scripts invoked this way can't take any input."

Update: Christiaan Knol replies: "I too thought this was great until I ran a script too many times and found I couldn't run them any longer. Trying the same command in the terminal I got the error 'No processes available.' It seems like these menu scripts don't exit properly and leave a whole lot of 'dead' processes - nothing a logout won't fix, but still annoying."