# Script Execution

Scripts can be executed by selecting "Start Script System" from the Script menu, pressing Ctrl+F6, or clicking the "Start Script System" button in the Script Editor.   
Execution of script can be stopped by selecting "Stop Script System" from the Script menu, pressing Ctrl+Break, or clicking the "Stop Script System" button in the Script Editor.

<p class="callout info">The operation of starting scripts will validate any script that has not been validated yet.  
</p>

<div drawio-diagram="407"><img src="https://doc316en.candera.eu/uploads/images/drawio/2023-02/drawing-7-1676350026.png" alt=""/></div>

<p class="callout info">To show the Script Editor, go to the Menu bar and select View &gt; Editors &gt; Script Editor.  
</p>

<div drawio-diagram="6459"><img src="https://doc316en.candera.eu/uploads/images/drawio/2024-07/drawing-5-1721982743.png" alt=""/></div>

---

#### Script System Playing (i.e. executing)  


Executing scripts changes the "Start Script System" button in the Script Editor to a "Pause" button:

<div drawio-diagram="6460"><img src="https://doc316en.candera.eu/uploads/images/drawio/2024-07/drawing-5-1721982783.png" alt=""/></div>

Executing the script shown in the screenshot produces output in the Candera Logging tab.

<div drawio-diagram="6461"><img src="https://doc316en.candera.eu/uploads/images/drawio/2024-07/drawing-5-1721982975.png" alt=""/></div>

During execution of scripts, their parameters in the ScriptComponent Property tab are updated in realtime to reflect their current values.

---

#### Script System Pausing (i.e. execution is paused)  


When script execution is paused, the button in the Script Editor changes to "Resume":

<div drawio-diagram="6462"><img src="https://doc316en.candera.eu/uploads/images/drawio/2024-07/drawing-5-1721983012.png" alt=""/></div>

When execution of scripts is paused, the parameters in the ScriptComponent Property tab can be edited and will affect script execution once it is resumed. The Enabled flag and the Priority can also be changed in realtime affecting the execution of scripts.

<div drawio-diagram="6463"><img src="https://doc316en.candera.eu/uploads/images/drawio/2024-07/drawing-5-1721983093.png" alt=""/></div>

---

#### Script System Stopped  


When execution is stopped, the parameters of all script components are reset to their values before execution was started. This includes any changes to parameter values during paused execution, as well as the Enabled flag of the component.

<p class="callout info">While scripts are being executed, they can be edited in the Script Editor. However they can only be validated when the script system is stopped. </p>

---