Script

Access information about the script.

Allows for accessing information about the script that is currently being run and controlling selected parts of the script execution.

+name

Name of the script.

static name(): string

+complete

Informs the system about script completion.

static complete()

Call this function to inform the system that the script have completed running.

When a script is run inside Siri and the Shortcuts app, Scriptable use heuristics to determine if the script have completed. If you find that a script takes too long to complete, you can manually call the complete function to stop the execution. Note that this should be done as the very last action the script performs.

When the script is run from a share sheet, the complete function will complete execution and dismiss the presented view.


+setShortcutOutput

Sets output when running the script as a shortcut action.

static setShortcutOutput(value: any)

Use this function to pass values to other actions in the Shortcuts app. The output can be a text, a number, a boolean, a dictionary or a fileURL pointing to a file stored in iCloud.

Parameters

value
any
Value to provide as output.