A script command that a macOS app supports.
- macOS 10.0+
A scriptable application provides scriptability information that describes the commands and objects scripters can use in scripts that target the application. An application’s scripting information is collected automatically by an instance of
NSScript, which creates an
NSScript for each command it finds, caches these objects in memory, and installs a command handler for each command.
A script command instance stores the name, class, argument types, and return type of a command. For example, commands in AppleScript’s Core suite include
The public methods of
NSScript are used primarily by Cocoa’s built-in scripting support in responding to Apple events that target the application. Although you can subclass the
NSScript class, it is unlikely that you would need to do so, or to create instances of it.