Code:
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Dshinvader schussbot", 289, 68, 193, 125)
$Label1 = GUICtrlCreateLabel("DshinVaders Schussbot", 88, 8, 117, 17)
$Button1 = GUICtrlCreateButton("GO!", 8, 32, 137, 33, 0)
$Button2 = GUICtrlCreateButton("Close", 144, 32, 137, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
While 1
send ( "{K}" )
WEnd
EndSwitch
WEnd
Case $Button2 Exit
EndFunc