Inspect

Total Control Inspect

The Inspect window displays the Scriptable environments currently active in Total Control. It provides a central place to inspect, restart, and access the JavaScript environments used by Terminals, REST, Runner, ScriptRun, callbacks, Tasks, and other scripting components.

  • Function — Shows Scriptables used by built-in or function-based script execution.
  • Runner — Shows Scriptables used by Runner and other persistent scripting components, including the three Terminals, UI Explorer, and REST where applicable.
  • ScriptRun — Shows Scriptables created by scriptRun() executions.
  • Callback — Shows Scriptables used by callbacks and event-driven scripts.
  • Task — Shows Scriptables associated with Task executions.
  • Status — Indicates whether the Scriptable is currently active or executing.
  • Restart — Discards and recreates the selected Scriptable environment, useful for resetting its JavaScript state or reloading modules during development.

Accessing a Scriptable

Named Scriptables can also be retrieved programmatically using the sigma/scriptable module. Total Control assigns names to internal Scriptables so scripts can locate and interact with them.

For example, the REST Scriptable can be obtained and modified:

var restScriptable = require('sigma/scriptable').find('REST');

restScriptable.hello = () => {
    print("Hello");
};

This adds hello() directly to the existing REST Scriptable, making the function available within that scripting environment.

TCHelp