Hallo kann mir jemand helfen und mir vielleicht sagen wieso mein Script nicht funktioniert weder die Hotkeys noch die Buttons funktionieren
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\user\desktop\form1.kxf
$Form1_1 = GUICreate("TEST TEXT", 220, 309, 316, 243)
$startb = GUICtrlCreateButton("Start", 40, 16, 139, 49)
GUICtrlSetOnEvent($startb,"_start")
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$stopb = GUICtrlCreateButton("Stop", 40, 80, 139, 49)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$exitb = GUICtrlCreateButton("Kill ME!", 40, 144, 139, 49)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("TEXT", 40, 208, 155, 17)
$Label2 = GUICtrlCreateLabel("TEXT", 40, 224, 79, 17)
$Label3 = GUICtrlCreateLabel("Up - Start", 40, 240, 47, 17)
$Label4 = GUICtrlCreateLabel("Down - Stop", 40, 256, 47, 17)
$Label5 = GUICtrlCreateLabel("ESC - Exit", 40, 272, 51, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $exitb
Exit
Case $startb
_start()
Case $stopb
_pause()
EndSwitch
WEnd
While 1
sleep(100)
WEnd
HotKeySet("{UP}","_start")
HotKeySet("{DOWN}","_pause")
HotKeySet("{ESC}","Exit")
Global $go = 0
While 1
if $go = 0 Then
Sleep (100)
Else
_move()
EndIf
WEnd
Func _start()
$go = 1
EndFunc
Func _pause()
$go = 0
EndFunc
Func _move()
While 1
MouseMove( 300, 300)
Sleep(2500)
MouseMove( 600, 300)
Sleep(2500)
WEnd
EndFunc