GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Toolbar buttons to toggle scripts


I have different scripts but all of them are using the same event to trigger them. I need to run only one of them at a specific time, therefore I need to be able to unload or load a different script (which again are using the same event to trigger them) and this selection will be thorough different buttons. Is it possible that you can add a command to load/unload a script.
The command should accept a scrip name and load/unload as arguments.

Thank you in advance.


The way to do this is to make the scripts check the state of a global or lister variable, and make buttons which set the variable as desired.


What should work as well is moving the scripts to be disabled out of /scripts or putting them in a subfolder "disabled". That's how I handle it. You might want to maintain a list of scripts to be affected, and you probably want to read that file via scripting as well.


Thank you TBone.