#include <GUIConstantsEx.au3>
$hParent = GUICreate('Test', 300, 300)
$button = GUICtrlCreateButton('Push me', 50, 50, 100, 30)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $button
Run('notepad')
EndSwitch
WEnd