Sign in to follow this  
Followers 0
ElmoNZ

Tiny bit of help needed

3 posts in this topic

I found Autoit this morning and it looks awesome so I decided to have a look through the manuals and find what I needed and I'm almost finished creating my script when I need one more bit of info to top it off.

I want the mouse to move to a certain position and then right click with a random delay and then left click with a random delay and repeat until I press a key.

MouseMove(1120, 921, 10)

$randomdelay = Random(187, 225, 1)
Sleep($randomdelay)
MouseClick("right", 1120, 921, 1)
$randomdelayone = Random(187, 225, 1)
Sleep($randomdelay)
MouseClick("left", 1120, 921, 1)

The bottom stack of code I need to turn off at my command so I can move my mouse around again.

How do I do this?

Thanks,

-Alex.

Share this post


Link to post
Share on other sites



I found Autoit this morning and it looks awesome so I decided to have a look through the manuals and find what I needed and I'm almost finished creating my script when I need one more bit of info to top it off.

I want the mouse to move to a certain position and then right click with a random delay and then left click with a random delay and repeat until I press a key.

MouseMove(1120, 921, 10)

$randomdelay = Random(187, 225, 1)
Sleep($randomdelay)
MouseClick("right", 1120, 921, 1)
$randomdelayone = Random(187, 225, 1)
Sleep($randomdelay)
MouseClick("left", 1120, 921, 1)

The bottom stack of code I need to turn off at my command so I can move my mouse around again.

How do I do this?

Thanks,

-Alex.

Somthing like this?

HotKeySet ("{esc}","_exit")

While 1
MouseMove(1120, 921, 10)
$randomdelay = Random(187, 225, 1)
Sleep($randomdelay)
MouseClick("right", 1120, 921, 1)
$randomdelayone = Random(187, 225, 1)
Sleep($randomdelay)
MouseClick("left", 1120, 921, 1)
WEnd

Func _exit()
    Exit
EndFunc

[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]

Share this post


Link to post
Share on other sites

Tyvm man! That works just how I wanted it to :)

-Alex.

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