What @a.mora has said is correct, generateScript()
is only called when pressing play on a program. If you want to run script code outside of genrate script, have a look into the secondary client interface. This will allow to send script when a program is not running if this is something that you require. For an example implementation of the secondary client, take at look at the following sample. It has a class which is used to send the script that you can copy if required.
1 Like