HotKeySet("{ESC}", "_exit")
Func _exit()
MsgBox(64 , "BYBY" , "Programm wird beendet")
Exit
EndFunc
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 451, 193, 125)
$KNUDDELS = GUICtrlCreateLabel("KNUDDELS", 240, 0, 63, 17)
$Input1 = GUICtrlCreateInput("Text", 96, 32, 465, 21)
$NR1 = GUICtrlCreateLabel("NR1", 64, 32, 26, 17)
$Dein = GUICtrlCreateInput("Text", 24, 160, 465, 21)
$NR2 = GUICtrlCreateLabel("NR2", 520, 168, 26, 17)
$Input3 = GUICtrlCreateInput("Text", 296, 240, 297, 21)
$NR3 = GUICtrlCreateLabel("NR3", 224, 248, 26, 17)
$Input4 = GUICtrlCreateInput("Text", 32, 304, 257, 21)
$Nr4 = GUICtrlCreateLabel("Nr4", 328, 304, 21, 17)
$Input5 = GUICtrlCreateInput("Text", 360, 344, 193, 21)
$Nr5 = GUICtrlCreateLabel("Nr5", 576, 352, 21, 17)
$verstecken = GUICtrlCreateButton("verstecken", 56, 208, 97, 25, 0)
$Start = GUICtrlCreateButton("Start", 192, 400, 265, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
MsgBox(64 , "BYBY" , "Programm wird beendet")
Exit
Case $verstecken
WinSetState ("Form1" , "" , @SW_HIDE)
EndSwitch
WEnd
was ist denn hier dran falsch