UritOR, Of course: #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Opt("GUIOnEventMode", 1) $hGUI = GUICreate("Test", 500, 500) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetOnEvent($GUI_EVENT_SECONDARYUP, "_SecondaryUp") $cButton = GUICtrlCreateButton("Test", 10, 10, 80, 30) GUICtrlSetOnEvent($cButton, "_Button") GUISetState() While 1 Sleep(10) WEnd Func _Button