URLScheme
URL scheme utilities for script automation
URLScheme provides methods to generate URLs for opening and running scripts.
Use URLScheme to:
Note
Use args.queryParameters for accessing URL parameters
Examples
let runURL = URLScheme.forRunningScript();
// Returns: scriptx:///run/MyScriptlet openURL = URLScheme.forOpeningScript();
// Returns: scriptx:///open/MyScript// Use args.queryParameters instead
let params = URLScheme.allParameters();
let value = URLScheme.parameter("key");Methods
allParameters
Get all URL parameters (deprecated)
Use args.queryParameters instead.
static allParameters(): string: string[]Returns: Dictionary of all query parameters
Example:
URLScheme.allParameters()parameter
Get a specific URL parameter (deprecated)
Use args.queryParameters[name] instead.
static parameter(name): string | nullname- Parameter name
Returns: Parameter value or null
Example:
URLScheme.parameter("key")forOpeningScript
URL for opening the current script
Returns a URL that opens the current script in the editor.
static forOpeningScript(): stringReturns: URL string
Example:
URLScheme.forOpeningScript()forOpeningScriptSettings
URL for opening script settings
Returns a URL that opens the settings for the current script.
static forOpeningScriptSettings(): stringReturns: URL string
Example:
URLScheme.forOpeningScriptSettings()forRunningScript
URL for running the current script
Returns a URL that runs the current script when opened.
static forRunningScript(): stringReturns: URL string
Example:
URLScheme.forRunningScript()