You write scripts for window and control events. To support these scripts, you can define:
Window-level and control-level functions
Instance variables for the window