Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every time I want to run an applescript the editor pops up.

Is there a way to run it directly?

share|improve this question
up vote 12 down vote accepted

How the script is saved has a big effect on how it will operate in Mac OS X. It sounds like your script is just saved as a script and that is what is causing the script editor to open every time you open the script.

To solve the problem, open the script in the AppleScript editor and save it as an application. That should to the trick.

The steps are (in the editor)

File > Save As > then set File Format to application then save.

link text

share|improve this answer
Now it prompts: "Press run to run or quit to quit"... but I guess that's script fault! Thank you – OscarRyz Jul 29 '09 at 0:38
Checking the run check box might stop the prompt from appearing. – Bruce McLeod Jul 29 '09 at 0:47
My understanding is that the Run Only checkbox doesn't allow editing of the script later. – jtbandes Jul 29 '09 at 0:48
@jtbandes ahhhh ... that makes sense – Bruce McLeod Jul 29 '09 at 1:01
Please note that in Yosemite, the current method is to use File -> Export. There's no more Save As dialogue in the latest version of AppleScript editor. – anon58192932 May 22 '15 at 18:32

When saving the script, you can choose "Application" from the File Format dropdown; then you will be able to run it, and you will still be able to drag it to Script Editor to open the script; or you can choose Run Only so it won't save the editable version.

Alternatively, you can use the osascript command in Terminal, either as osascript /path/to/script or osascript -e "a short script here".

share|improve this answer

You can also place the script in your ~/Library/Scripts/Finder/ folder and run it directly from the Script menu.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .