How to change button variables via script

#1 affects the session, changes may be saved (see this thread to avoid the warning when quitting), with #2 the session doesn't change, only the state of the properties.