Mac Developer Library

Developer

Automator Framework Reference AMAppleScriptAction Class Reference

Options
Deployment Target:

On This Page
Language:

AMAppleScriptAction

Important:AMAppleScriptAction is considered deprecated. Use the Cocoa-AppleScript template (an instance of AMBundleAction) in Xcode to create AppleScript-based Automator actions. More...

Inheritance


Conforms To


Import Statement


import Automator @import Automator;

Availability


Available in OS X v10.4 and later.
  • An OSAScript object representing the receiver’s script containing the on run command handler.

    Declaration

    Swift

    var script: OSAScript!

    Objective-C

    @property(strong) OSAScript *script

    Discussion

    By default, script is main.applescript, which is stored in the action bundle. You can use setScript: to set the receiver’s script to newScript, where newScript must be an OSAScript object that could be instantiated from a script in the action bundle. script must contain the on run command handler.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.4 and later.