Jump to content
Sign in to follow this  
theboydave

loop until keystroke

Recommended Posts

I'm trying to make an autoclicker script that stops when the user presses a key. what I have right now is this:

CODE
#include <misc.au3>

Do

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 490, 325, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 365, 230, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 514, 405, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 255, 136, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 648, 327, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 433, 402, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 652, 416, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 487, 479, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 477, 508, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 490, 325, 1, 0)

MouseClick("left", 523, 118, 1, 0)

For $i = 0 to 255

if (key=0) Then

Int key = _IsPressed(Hex($i))

EndIf

Next

Until key

I don't know if that's right or not, and I am new at using AutoIt. Can somebody tell me if this will work, and if not how I can change it?

Share this post


Link to post
Share on other sites

After some editing I have this:

CODE
#include <misc.au3>

Do

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 490, 325, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 365, 230, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 514, 405, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 255, 136, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 648, 327, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 433, 402, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 652, 416, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 487, 479, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 477, 508, 1, 0)

MouseClick("left", 523, 118, 1, 0)

MouseClick("left", 490, 325, 1, 0)

MouseClick("left", 523, 118, 1, 0)

Sleep(10000)

For $i = 0 to 255

If $key=0 Then

$key = _IsPressed(Hex($i))

EndIf

Next

Until key

but it still doesn't work :P

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  

×
×
  • Create New...