How do I make a script run when panel starts up/shuts down?

The panel has event scripts that run on startup and shutdown. In this article we show you where these scripts are and how to set them up.

Click on an empty space in the work area

media_1354024658340.png

This selects the RootPanel object – the gray area that is behind the devices and visual controls. Once selected the Root Panel properties are shown in the Property Editor on the right.

Double-click on theOnStartup script

media_1354024823699.png

The OnStartup script is now empty. When you double-click it the Script Editor opens.

Create your script in the Script Editor in the normal way

media_1354025006416.png

Whatever commands you put in here will run when the panel starts up.

And what about Shutdown scripts?

media_1354025091302.png

In the same way you can edit the OnShutdown script to run a set of commands when the panel shuts down. You just double click the OnShutdown event script item in the Property Editor.