Calling a script
There are examples of this in the APC40 MKII MIDI device scripting
Name it
Codename "MyScriptName"
Run it
StartCode "MyScriptName"
Ensure you exit the previous script if needed, otherwise it will keep running.
Global vs local scripts
Scripts are all global so can be stored anywhere.
A typical place to put global scripts is on the right sidebar “PangoScript” tab, but you don’t have to.