AutoHotkey Version 2.0 Drops the GUI gLabel in Favor of the Object OnEvent() Function
In AutoHotkey V1.1, the primary method for adding action to GUI pop-up windows employs the gLabel inserted into a GUI control’s options. As AutoHotkey moves to object-oriented programming in V2.0, the Gui.OnEvent() function replaces gLabels.
In AutoHotkey V2.0, each GUI control responds to different Gui Events. For example, with the Gui Button control, you can register OnEvent() functions for Click, DoubleClick, Focus, and LoseFocus, while the Edit control directly supports Change. You register each type of initiating action you use with the OnEvent() function. In fact, you must register an event before AutoHotkey will respond. Continue reading