Brauche Hilfe bei einem Script

04/18/2011 14:42 Dimon95#1
Hallo Leute,
Ich habe versucht einen Bot zu machen für ein Spiel, aber leider funktioniert die Exit funktion nicht.(F12)Könnte mir einer helfen?
Außerdem wäre eine Bedingung gut, also Fenster XYZ muss offen sein, damit F11 funktioniert, wenn nicht dass eine Nachricht kommt und da steht: Please open GTA_SA.


Mfg
Schake


MsgBox(0,"AFK BOT BY SCHAKE","Press ingame:"&@CRLF&"F10 to test the bot"&@CRLF&"F11 to start the bot"&@CRLF&"F12 to stop the bot")
HotKeySet ("{F10}","test")
func test()
sleep (250)
Send ("tTest successful")
send ("{ENTER}")
EndFunc
HotKeySet ("{F11}","start")
while 1
sleep (5000)
WEnd
func start()
Sleep(250)
send ("/tStarted")
send ("{ENTER}")
sleep (5000)
While 1
Sleep(300000)
send ("t/afkback")
send ("{ENTER}")

WEnd
EndFunc
HotKeySet ("{F12}","stop")
Func stop()
Exit
EndFunc
04/18/2011 14:59 BlackHybrid#2
Du kannst den Hotkey F12 nicht verwenden, da sie durch windows reserviert ist. Steht aber auch in der Helpfile.

Und bitte das nächste mal aussagekräftige Themen Titel.
04/18/2011 15:12 Dimon95#3
Könntest nochmal wegen der Bedingungsfunktion helfen?
Und eine Frage wäre eine Hidden Funktion möglich?

Ich habe ziemlich viele Ideen. Wie kann man einen Schieberegler machen, der den Abstand von F11 bestimmt also den Abstand zwischen t/afkback.
04/18/2011 16:30 derpo#4
PHP Code:
MsgBox(0,"AFK BOT BY SCHAKE","Press ingame:"&@CRLF&"F10 to test the bot"&@CRLF&"F11 to start the bot"&@CRLF&"F12 to stop the bot")
While 
1
If _IsPressed("7B"Then
Exit
ElesIf _IsPressed("79"Then
test
()
EndIf
Sleep(10)
WEnd
func test
()
sleep (250)
Send ("tTest successful")
send ("{ENTER}")
EndFunc
HotKeySet 
("{F11}","start")
while 
1
sleep 
(5000)
WEnd
func start
()
Sleep(250)
send ("/tStarted")
send ("{ENTER}")
sleep (5000)
While 
1
Sleep
(300000)
send ("t/afkback")
send ("{ENTER}")
WEnd
EndFunc