Sign in to follow this  
Followers 0
Guest IBL33TN1Nj4

On Keystroke

2 posts in this topic

I am writing a bot for AO which is very simple right now but will work for my needs. This is the code I have.

$answer = MsgBox(4, "L3t'5 G3t D0Wn!", "Joo R3aDy t0 pwn?")

If $answer = 7 Then

Exit

EndIf

Sleep(5000)

$Loop = 0

While $Loop = 0

Send("{TAB}")

Sleep(100)

Send("q")

Sleep(5000)

Wend

I need an On Keystroke command to change $Loop to 1. Can anyone give me the command?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Should work. Should have been in Support forum though.

If (MsgBox(4, "L3t'5 G3t D0Wn!", "Joo R3aDy t0 pwn?")) = 7 Then Exit

Func stoploop()
   $Loop = Not $Loop
EndFunc

HotKeySet("{F10}", "stoploop")

Sleep(5000)

$Loop = 1

While $Loop
   Send("{TAB}")
   Sleep(100)
   Send("q")
   Sleep(5000)
Wend
Edited by MSLx Fanboy

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0