Jump to content
Sign in to follow this  
lost1010

Is it possible to make this program click, wait and repeat?

Recommended Posts

lost1010

ok i know im new here and i know that i have no clue how to use auto it, that's why im here. i wanna know if it's possible to make a script that clicks on a certain position, waits a bit, clicks in a few other places and after that repeats. if you can make it i'd appreciate to know how becasue this is too big of a forum to go through every page.

[ }{-U-T-}{ ]

lost1010

Share this post


Link to post
Share on other sites
Orgins

The autoit help file that comes with autoit will tell you most of what you need to know.

First you'll have to find the x,y's of where you want it to click at. Use the Autoit window info program that came with autoit and click the muse tag.

The code should look something like this:

$i = 0
While $i <= 10
MouseClick("left", 0, 500); Left clicked once at 0x 500y
Sleep(5000);five seconds delay
MouseClick("left", 0, 500); Left clicked once at 0x 500y 2nd time
MouseClick("left", 0, 500); Left clicked once at 0x 500y 3rd time
MouseClick("left", 0, 500); Left clicked once at 0x 500y 4th time
    $i = $i + 1; Adds 1 to $1           (loops it into $i is 10)
WEnd

**Edit you may want to used some HotKeySet (to pause/kill the script) like so:**

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")


$i = 0
While $i <= 10
MouseClick("left", 0, 500); Left clicked once at 0x 500y
Sleep(5000);five seconds delay
MouseClick("left", 0, 500); Left clicked once at 0x 500y 2nd time
MouseClick("left", 0, 500); Left clicked once at 0x 500y 3rd time
MouseClick("left", 0, 500); Left clicked once at 0x 500y 4th time
    $i = $i + 1; Adds 1 to $1           (loops it into $i is 10)
WEnd

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

The pause button pauses it the ESC button will kill it.

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites
lost1010

ok, i don't want to be a d**k but would you mind explaining that little bit of codeing? i want to learn instead of just to go to this post and copy/paste, im going into the help file now and ill tell you not to bother if i figure it out.

Share this post


Link to post
Share on other sites
lost1010

DW you did explain it, and very well, i just didn't notice it. Thanks

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.