Command or script to load eventlist

I always work around that with a boolean variable which is set parallel to the action of the Button. I wrote this down before here, in German, though. (But Google will help you translating it.)

Keep in mind to define the initial state of these variables as well as the button state itself in a procedure OnLoad.