Applet and Droplet
An applet is a compiled script file format that functions as an executable. A dedicated editor such as the Script Editor offers the option to save a compiled script as an applet (or “application,” depending on your Script Editor version). When you open an applet from the Finder, it launches as if it were an application and its code runs. Furthermore, an applet is scriptable. In short, an applet is a simple, easy way for someone who knows AppleScript to write a little application. This application has just about no user interface to speak of (unless some is added by way of a scripting addition). But the disadvantages of this can easily be outweighed by the simplicity of writing one.
Tip
An applet is an application. It is saved in Mac OS X with file
extension .app, and in Mac OS 9 it has file type
'APPL' and creator 'aplt‘. The
Mac OS X Script Editor saves the applet with both features. There is
also a new “application bundle”
format, also with file extension .app, which is
not backward-compatible with systems prior to Mac OS X 10.3
(“Panther”).
A
droplet
is a form of applet; the difference is
that a droplet does something when file or folder icons are
dragged-and-dropped onto its icon in the Finder. Typically it then
proceeds to process those files or folders in some way. Technically,
a droplet is simply an applet whose script contains an
open handler for dealing with the drop. Indeed, the very same script application can operate both as an applet (it does something ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access