URLScheme
Manages URL schemes for Scriptable.
Use URL schemes to launch the app and perform an action, such as running a script.
The app conforms to the scriptable:// URL scheme. The following actions can be performed using the URL scheme.
Adding a script To add a new script, you should use the following URL scheme:
scriptable:///add
Opening a script To open an existing script, you should use the following URL scheme:
scriptable:///open/Example
The scriptName query parameter is the name of the script to open. scriptName must be URL encoded. You may optionally add the query parameter openSettings with a value of true to automatically open the script settings.
Running a script To run an existing script, you should use the following URL scheme:
scriptable:///run/Example
The scriptName query parameter is the name of the script to run. scriptName must be URL encoded.
If you set openEditor to true, the script will run with the editor shown opposed to running directly from the list of scripts. Opening the editor to run the script is beneficial in cases where you need to view messages logged to the console.
In addition to the scriptable:// scheme, you can also perform the above actions using the universal link open.scriptable.app, e.g. https://open.scriptable.app/run/Example
Methods
Section titled “Methods”allParameters()
Section titled “allParameters()”Gets all parameters from invocation of URL scheme.
static allParameters(): {string: string}Gets all the query parameters that were passed in the URL when running this script by invoking its URL scheme.
Return value
Section titled “Return value”{string: string}
All query parameters.
forOpeningScript()
Section titled “forOpeningScript()”URL for opening the script.
static forOpeningScript(): stringGets the URL for opening the current script. When making a request to the returned URL from another app, e.g. Safari, the script will be opened.
Return value
Section titled “Return value”string
URL for opening script.
forOpeningScriptSettings()
Section titled “forOpeningScriptSettings()”URL for opening script settings.
static forOpeningScriptSettings(): stringGets the URL for opening the settings of the current script. When making a request to the returned URL from another app, e.g. Safari, the settings of the current script will be opened.
Return value
Section titled “Return value”string
URL for opening script settings.
forRunningScript()
Section titled “forRunningScript()”URL for running script.
static forRunningScript(): stringGets the URL for running the current script. When making a request to the returned URL from another app, e.g. Safari, the current script will run.
Get the query parameters using the args.queryParameters.
Return value
Section titled “Return value”string
URL for opening script settings.
parameter(name)
Section titled “parameter(name)”Gets a parameters from invocation of URL scheme.
static parameter(name: string): stringGets the value of a query parameter that was passed in the URL when running this script by invoking its URL scheme.
Parameters
Section titled “Parameters”name string
Name of the query parameter to get the value for.
Return value
Section titled “Return value”string
Value of query parameter.