Class

NSUserScriptTask

An object that executes scripts.

Declaration

@interface NSUserScriptTask : NSObject

Overview

The NSUserScriptTask class is able to run all the scripts normally run by the one of its subclasses, however it ignores the results. It is intended to execute user-supplied scripts and will execute them outside of the application's sandbox, if any.

If you need to execute scripts and get the input and output information use the NSUserUnixTask, NSUserAppleScriptTask, and NSUserAutomatorTask sub classes.

Topics

Specifying the Script

- initWithURL:error:

Return a user script task instance given a URL for a script file.

scriptURL

The URL of the script file.

Executing the User Script

- executeWithCompletionHandler:

Executes the script with no input and ignoring any result.

Constants

NSUserScriptTaskCompletionHandler

Implement this block to retrieve the error of the script executed by executeWithCompletionHandler:.

Relationships

Inherits From

See Also

Scripts and External Tasks

NSTask

An object representing a subprocess of the current process.

NSUserAppleScriptTask

An object that executes AppleScript scripts.

NSUserAutomatorTask

An object that executes Automator workflows.

NSUserUnixTask

An object that executes unix applications.