Execute script on file opening

Yes, you’ll only need to store them in scriptcontext.sticky if you want to get hold of them or disable them after they have been started. Otherwise they run forever. The good thing is that scriptcontext.sticky survives between sessions unless you use Reset Script Engine from the EditPythonScript Tools menu.

There are many examples if you search for python and events here is one using the idle event and this one is called when an object is added.

_
c.

1 Like