Class

NSUserScriptTask

The NSUserScriptTask class is an abstract class that 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.

Overview

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

Symbols

Specifying the Script

init(url: URL)

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

var scriptURL: URL

The URL of the script file.

Executing the User Script

func execute(completionHandler: NSUserScriptTask.CompletionHandler? = nil)

Executes the script with no input and ignoring any result.

Constants

CompletionHandler

Implement this block to retrieve the error of the script executed by execute(completionHandler:).

Relationships

Inherits From

Conforms To