Send("{ESC}") won't work ingame

07/14/2014 19:44 xMenex#1
I am trying to make a anti-afk-bot for GTA SA-MP. Every key works but not escape (Ingame)

Code:
#RequireAdmin
_antiafk()

Func _antiafk()
While 1
	Sleep(5000)
	Send("{ESCAPE}")
	Sleep(540000)
	Send("{ESCAPE}")
	Send("W")
	Sleep(2000)
WEnd
EndFunc
Can you help me?
07/14/2014 21:01 -SoulCr4ck-#2
Quote:
Originally Posted by xMenex View Post
I am trying to make a anti-afk-bot for GTA SA-MP. Every key works but not escape (Ingame)

Code:
#RequireAdmin
_antiafk()

Func _antiafk()
While 1
Sleep(5000)
Send("{ESCAPE}")
Sleep(540000)
Send("{ESCAPE}")
Send("W")
Sleep(2000)
WEnd
EndFunc
Can you help me?
Code:
Send("{Esc}")
Ehm..sleep (540000)..
540 seconds?
07/14/2014 21:02 xMenex#3
Quote:
Originally Posted by x[Deadline View Post
Code:
Send("{Esc}")
Ehm..sleep (540000)..
540 seconds?
Yeah, on this samp server you are marked for afk after 10 minutes
07/14/2014 21:14 -SoulCr4ck-#4
Quote:
Originally Posted by xMenex View Post
Yeah, on this samp server you are marked for afk after 10 minutes
Try send ("{Esc}") or try it with ControlSend..
07/14/2014 22:53 alpines#5
"{ESCAPE}" is no valid key sequence. Check out the valid keys at the AutoIt Send reference.
As x[Deadline said, it's "{ESC}".
Also use {} around letters if you want to simulate a key push otherwise programs will handle it as text.