Jump to content

On Keystroke


Guest IBL33TN1Nj4
 Share

Recommended Posts

Guest IBL33TN1Nj4

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?

Link to comment
Share on other sites

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())
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...