I have an Applescript that simply opens a Dialog Box, asks for a user input and runs a Terminal Command and spits out the answer. It works great in AppleScript Editor yet I am trying to work out how I could package this Script File along with an icon to make a Mac App for my personal use. Thoughts.
Asked
Active
Viewed 2.6k times
4 Answers
30
In Script Editor, select File > Save As and set File Format to Application. (In Mojave and later, the Save As choice in the File menu is not visible unless you hold down the Option key.)
Open Bundle Contents drawer and see the applet.icns file, copy your icon to that.
See "Saving a script as an application" in Script Editor help.

mmmmmm
- 30,160
-
+1, but +2 if I could. I've been using Applescript for years and had no idea about the icon trick. Very slick. – Philip Regan Feb 13 '11 at 12:58
-
1Under El Capitan this seems to be File->Export now. – Von Oct 02 '16 at 17:36
8
In El Capitan at least you can use osacompile
, e.g:
osacompile -o MyScript.app MyScript.scpt

nohillside
- 100,768

Von
- 191
-
used in december 2021 on mac os big sur. works perfectly. using this in my toolchain that compiles typescript via javascript to applescript apps. If someone is interested, checkout my github – Tobi Dec 07 '21 at 23:24
2
to export an an application, do File -> Export and set the drop-down list to "Application"
1
Open the information window for your Application cmd+i
and drag your icon file (icns
format) onto the top left default icon.

makra
- 11