Sign in to follow this  
Followers 0
Yata

Click randomly within a specified area with a random time between the clicks

2 posts in this topic

Could someone please give me the code that could take a square area of pixels and click a random one each time, having a random time between the clicks? The time area would be between 2-5 seconds.

Thank you.

Share this post


Link to post
Share on other sites



RandomMouseClick(100, 100, 100, 100, 10, 2, 4)

;LL = Left
;TT = Top
;WW = Width
;HH = Height
;iNum = Number of clicks
;iMin = Lowest interval (in seconds)
;iMax = Highest interval (in seconds)
Func RandomMouseClick($LL, $TT, $WW, $HH, $iNum, $iMin, $iMax)
    For $X = 1 to $iNum
        MouseClick ("left",Random($LL, $LL+$WW, 1),Random($TT, $TT+$HH, 1),1,0)
        Sleep(Random($iMin, $iMax,1) * 1000)
    Next
EndFunc

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