Configure window scripts
- Last UpdatedApr 09, 2025
- 2 minute read
Window scripts are scripts that are linked to specific windows. You can use the GetWindowName script function to help the run-time environment reduce scripting necessary to load windows. You can use window scripts to:
-
Execute a script one time when an InTouch window is opened.
-
Execute a script periodically while an InTouch window is open.
-
Execute a script one time when an InTouch window is closed.
Note: Opening an InTouch window is also referred to as "showing an InTouch window." Closing an InTouch window is also referred to as "hiding an InTouch window."
Configure a window script
-
In the Windows pane, right-click on a window and then select Window Scripts.
The Window Script for Window Name dialog box appears.

-
In the Condition Type list, do one of the following:
-
Select On Show to configure a script to execute one time when the associated window is started.
-
Select While Showing to configure a script to execute periodically while the associated Window is open.
-
Select On Hide to configure a script to execute one time when the associated window is closed.
-
-
If you select While Showing in the previous step, type a time interval between 1 and 360000 milliseconds in the Every box.
-
Type your script in the window.
-
Select OK.
Delete a window script
-
In the Windows pane, right-click on a window and select Window Scripts. The Window Script for Window Name dialog box appears.
-
In the Condition Type list, select the script trigger for the script to delete. The script appears in the main section of the Window Script for Window Name dialog box.
-
On the Edit menu, select Clear.
Important: Do not use on hide scripts to read from or write to I/O tagnames. The I/O value update
does not necessarily complete before the window is hidden.
To read from or write to I/O tagnames when a window closes, configure a data change
script and activate it from an on hide script.