Autoit Bot problem

07/20/2012 14:55 Bauernfrosch#1
Hallo ich hab mal nen Bot programmiert aber ich will das beim GUI steht
Starten F1
Stoppen F2
Nur wenn ich alle zwei dazufüge kommt nur 1 davon
Quote:
GUICreate("Nosbot", 200, 200, 1000, 350) ;==> Zeichnet GUI
GUISetState() ;==> Zeigt GUI an
$Button = GUICtrlCreateLabel ("Starten:F1",30, 60, 60, 100)
$Button2 = GUICtrlCreateLabel ("Stoppen:F2",20, 40, 70, 90)
HotKeySet("{F1}", "starten")
HotKeySet("{F2}", "pause")
HotKeySet("{F3}", "quit")

While 1
Sleep(100)
WEnd

Func starten()
While 1
sleep(100)
Controlsend("NosTale","","", "{space}")
sleep(100)
Controlsend("NosTale","","", "{x}")
WEnd
Endfunc


Func pause()
While True
Sleep(1000)
WEnd
Endfunc


Func quit()
Exit
Endfunc
07/20/2012 14:59 Mr.Tr33#2
Halt mal deine rechte Hand vor dein Gesicht und nun die Linke vor deine Rechte. Jetzt sag mir doch bitte ob du immer noch deine rechte Hand siehst ;)
Code:
GUICreate("Nosbot", 200, 200, 1000, 350) ;==> Zeichnet GUI
GUISetState() ;==> Zeigt GUI an
$Button = GUICtrlCreateLabel("Starten:F1", 30, 20, 60, 100)
$Button2 = GUICtrlCreateLabel("Stoppen:F2", 20, 40, 70, 90)
HotKeySet("{F1}", "starten")
HotKeySet("{F2}", "pause")
HotKeySet("{F3}", "quit")

While 1
	Sleep(100)
WEnd

Func starten()
	While 1
		Sleep(100)
		ControlSend("NosTale", "", "", "{space}")
		Sleep(100)
		ControlSend("NosTale", "", "", "{x}")
	WEnd
EndFunc   ;==>starten


Func pause()
	While True
		Sleep(1000)
	WEnd
EndFunc   ;==>pause


Func quit()
	Exit
EndFunc   ;==>quit