Jump to content
Sign in to follow this  
SmOke_N

Random Mouseclicks?

Recommended Posts

Hey, just a quck question, how would I generate random mouse clicks.

Wanting to click the mouse somewhere between the x/factors x-420 x-440, and they y/factors y-550 y-570 on clicks.

And would random work on MouseDrag?

Searched the forum but I couldn't find the specific answer needed.

Thanks


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Random(420,440) ?


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

Random(420,440) ?

<{POST_SNAPBACK}>

No such luck Insolence, I've tried that :lmao:.... but thanks for the reply.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Have you tried this:

MsgBox("","", Round( Random(420, 440) ) )

I think Random returns a 'float' (1.02038293)


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

No such luck Insolence, I've tried that :lmao:.... but thanks for the reply.

<{POST_SNAPBACK}>

Works for me, but I've only tried on the Windows desktop (not in a game or anything):

HotKeySet("{ESC}, "Quit")
Func Quit()
    Exit
EndFunc

While 1
    sleep(100)
    MouseClick("left", Random(420,440,1), Random(550,570,1), 1, 1)
WEnd

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Works for me, but I've only tried on the Windows desktop (not in a game or anything):

HotKeySet("{ESC}, "Quit")
Func Quit()
    Exit
EndFunc

While 1
    sleep(100)
    MouseClick("left", Random(420,440,1), Random(550,570,1), 1, 1)
WEnd

<{POST_SNAPBACK}>

Hey, not fair, with the direction of Layer I figured it out on my own :lmao:

MouseMove (Random(450, 470), Random(550, 570))
MouseDown("left")
MouseUp("left")
Sleep(Random(0, 3000))

Different direction, but worked *hows that for a week* o:)


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...