Skip to content

ScriptID / ScriptName (script identity)

ts
function ScriptID(): string;
function ScriptName(): string;

ScriptID() returns the unique identifier of the script currently being executed. ScriptName() returns its human-readable name.

Both functions return an empty string when no ID or name has been assigned by the host application.

NOTE

These functions are useful for logging, diagnostics, and correlation. Include the script ID in log messages to make it easy to trace which script produced a given log entry when multiple scripts run concurrently.

Example

ts
Log("Script ID: " + ScriptID());
Log("Script name: " + ScriptName());