How to make an executable program from AppleScript

node ninja picture node ninja · Sep 15, 2010 · Viewed 18k times · Source

In order to run my AppleScript program I have to open it up and select "run." I want the program to just run when I click on it. I tried to compile it, but it didn't seem to make a difference or create a new file.

Answer

regulus6633 picture regulus6633 · Sep 15, 2010

2 ways.

1) my preferred method is to activate the Script menu. If you're using 10.6, open AppleScript Editor. Open the preferences and under the General tab click "Show Script menu in Menu Bar". Now you'll get a new icon in the menu bar section at the top-right of your screen. You can run any applescript from that menu. (in 10.5 the process is different but you can google for directions). To put an applescript in that menu just go to the folder ~/Library/Scripts and add your applescript to it. Choosing your applescript from the Script menu will run it.

2) "Save As..." from the file menu in AppleScript Editor and set the "File Format" to application. Then it works like any other application... just double-click it to run it.

NOTE: if you use the Script menu... selecting a script will run it. If you want to instead open the script in AppleScript Editor for editing then hold the option key down while choosing the script.