Instance Method

execute(withInput:completionHandler:)

Execute the Automator workflow by providing it as securely coded input.

Declaration

func execute(withInput input: NSSecureCoding?, completionHandler handler: NSUserAutomatorTask.CompletionHandler? = nil)

Parameters

input

The automator task.

handler

The completion handler Block that returns the result or an error. See NSUserAutomatorTask.CompletionHandler.

Discussion

The Automator workflow will execute using the variables property values.

This method should be invoked no more than once for a given instance of the class.

If the script completed normally, the completion handler's error parameter will be nil.

See Also

Executing Automator Tasks

var variables: [String : Any]?

The variables required by the Automator workflow.