A_GuiControl
The name of the variable associated with the GUI control that launched the current thread. If that control lacks an associated variable,
A_GuiControl instead contains the first 63 characters of the control's text/caption (this is most often used to avoid giving each button a variable name). A_GuiControl is blank whenever: 1) A_Gui is blank; 2) a GUI menu bar item or event such as GuiClose/GuiEscape launched the current thread; 3) the control lacks an associated variable and has no caption; or 4) The control that originally launched the current thread no longer exists (perhaps due to Gui Destroy).
Code: Select all
#O::MsgBox, %A_GuiControl%