Execute applescript without open the editor

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


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".


Under macOS High Sierra 10.13 there is no File / Save as.

You must use File / Export / File Format: Application File Export File Format