execute(withInput:completionHandler:)
Execute the Automator workflow by providing it as securely coded input.
Declaration
func execute(withInput input: (any NSSecureCoding)?, completionHandler handler: NSUserAutomatorTask.CompletionHandler? = nil)func execute(withInput input: (any NSSecureCoding)?) async throws -> AnyParameters
- input:
The automator task.
- handler:
The completion handler Block that returns the result or an error. See 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.