Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an executable program from AppleScript

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.

like image 706
node ninja Avatar asked Sep 15 '10 04:09

node ninja


1 Answers

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.

like image 126
regulus6633 Avatar answered Oct 13 '22 03:10

regulus6633