Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Is there a way to run it directly?

share|improve this question

3 Answers 3

up vote 9 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
1  
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. –  advocate May 22 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.