Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run applescript on 2x-click

OK, this feels like an idiot question, but I'm stuck - I don't know the first thing about AppleScript. I have a .scpt file and I want to double-click it and just have it run, but instead every time I click, it opens up the AppleScript Editor. This feels like it should just be an option on the file, but I'm missing something obvious.

Please help me feel less dumb, thank you.

like image 263
scottru Avatar asked Mar 30 '10 08:03

scottru


People also ask

What is replacing AppleScript?

Using Swift.

How do I run AppleScript Editor?

1. Open the "Applications" folder and double-click on the "AppleScript" folder. Double-click on the "Script Editor" or "AppleScript Editor" icon to launch the program.


1 Answers

From the “File” menu, choose “Export”; there’ll be a “File Format” dropdown underneath the file browser. To get a double-clickable application instead of a document, choose “Application”. This will produce a .app bundle like ordinary Mac applications (this will also let you package other resources with your script if you need to). You can choose “Run Only” or not; if you do, then anybody with just the .app won’t be able to edit your script further, since it’ll be compiled. (But if you’re saving a copy as the application, that might be what you want.)


Another option, as per an anonymous user on Ask Different, would be to save/export your file as a “Script” (.scpt) or “Script Bundle” (.scptd), save it in ~/Library/Scripts/, and check “Show Script menu in menu bar” in Script Editor’s preferences.


(If you’re running an old version of OS X, the first version of this answer has the information you’re looking for.)

like image 63
Antal Spector-Zabusky Avatar answered Nov 16 '22 01:11

Antal Spector-Zabusky