Jump to content

Help with a continuous loop


Da64u
 Share

Recommended Posts

Hey, After searching for about 20 mins. Im not able to find the perfect way to write this. Im only looking for the script when executed to move to s certain spot and keep clicking, over and over till i hit a button. I dont care what button it is, i was using the number 0.. Here is what i have so far, It clicks it two times and then closes..

$i = 0
While $i <= 10
    MouseMove(344,462)
MouseDown("left")
MouseUp("left")
MouseDown("left")
MouseUp("left")
    $i = $i + 1
WEnd

I have also tried the Do Until command, and it didnt work at all..

Please modify the code to work =] thanks

Link to comment
Share on other sites

use spacebar to stop

HotKeySet("{SPACE}","_Stop")

MouseMove(344,462)

Global $Loop = True

Do
    MouseClick("Left")
    Sleep(10)
Until $Loop = False


Func _Stop()
    $Loop = False
EndFunc
Edited by andybiochem
- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

Hey, After searching for about 20 mins. Im not able to find the perfect way to write this. Im only looking for the script when executed to move to s certain spot and keep clicking, over and over till i hit a button. I dont care what button it is, i was using the number 0.. Here is what i have so far, It clicks it two times and then closes..

$i = 0
While $i <= 10
    MouseMove(344,462)
MouseDown("left")
MouseUp("left")
MouseDown("left")
MouseUp("left")
    $i = $i + 1
WEnd

I have also tried the Do Until command, and it didnt work at all..

Please modify the code to work =] thanks

For $i = 0 To 10
MouseClick("left", 344, 462, 2)
Next

That will click that spot twice 10 times.

I can't help you with the button part without more information about it.

Edited by jebus495
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...