Skip to content

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?scriptName=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?scriptName=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?scriptName=Example

+allParameters

Gets all parameters from invocation of URL scheme.

Deprecated in version 1.3. Use args.queryParameters instead.

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

{string: string}
All query parameters.


+parameter

Gets a parameters from invocation of URL scheme.

Deprecated in version 1.3. Use args.queryParameters instead.

static parameter(name: string): string

Gets the value of a query parameter that was passed in the URL when running this script by invoking its URL scheme.

Parameters

name
string
Name of the query parameter to get the value for.

Return value

string
Value of query parameter.


+forOpeningScript

URL for opening the script.

static forOpeningScript(): string

Gets 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

string
URL for opening script.


+forOpeningScriptSettings

URL for opening script settings.

static forOpeningScriptSettings(): string

Gets 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

string
URL for opening script settings.


+forRunningScript

URL for running script.

static forRunningScript(): string

Gets 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.

Any query parameter in the URL will be available using the URLScheme bridge. Get the query paramters using the allParameters() and parameter(name) functions.

Return value

string
URL for opening script settings.