Starting and stopping the background script
The Background Engine executor is activated automatically when the X Vision system is started and executes the script loaded at startup in the background.
The changes made to a background script therefore have the effect, usually, at system restart.
The commands in the Engine menu of the background script editor allow:
- Stop running the current script, in order to debug the edited script or other texts without interference from running the current script.
- Reactivate, after having stopped it, the executor of the background scripts, forcing the reloading of the script, in order to make the changes made effective
To stop running the current background script:
- Select the Stop command from the Engine menu of the background script editor. Before the stop, the OnTerminate procedure defined in the script is executed.
Note: by stopping the executor, the OnTerminate procedure of the current script is executed once; reactivating it once executes the OnInitialize procedure.
To reactivate the execution of the background script:
- Select the Start command from the Engine menu of the background scripts. The procedure is initially executed, then resumes the management of the OnTimer procedure until it stops.
Note: when the executor is reactivated, the changes are made until the last saving.
To make the changes to the background script take effect:
- Save the changes made to the script by selecting the Save command from the File menu of the background script editor.
- Select the Stop command from the Engine menu of the background script editor to stop running the current script. The OnTerminate procedure defined in it is executed.
- Select the Start command from the Engine menu of the background script editor to re-enable the Executor, reloading the saved background script. The OnInitialize procedure is initially executed, then resumes the management of the OnTimer procedure until it stops.