Contents

init(url:)

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

Declaration

init(url: URL) throws

Parameters

  • url:

    The script URL.

Return Value

An instance of an NSUserScriptTask subclass or nil if the file does not appear to match any of the known types.

Discussion

The returned object will be of one of the specific sub-classes (NSUserUnixTask, NSUserAppleScriptTask, and NSUserAutomatorTask), or nil if the file does not appear to match any of the known types.

If invoked from a subclass, the result will be that class or nil.

See Also

Specifying the Script