Moderators SmOke_N Posted February 27, 2005 Moderators Posted February 27, 2005 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.
Insolence Posted February 27, 2005 Posted February 27, 2005 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.
Moderators SmOke_N Posted February 27, 2005 Author Moderators Posted February 27, 2005 Random(420,440) ?<{POST_SNAPBACK}>No such luck Insolence, I've tried that .... 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.
Insolence Posted February 27, 2005 Posted February 27, 2005 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.
CyberSlug Posted February 27, 2005 Posted February 27, 2005 No such luck Insolence, I've tried that .... 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!
Moderators SmOke_N Posted February 27, 2005 Author Moderators Posted February 27, 2005 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 MouseMove (Random(450, 470), Random(550, 570)) MouseDown("left") MouseUp("left") Sleep(Random(0, 3000))Different direction, but worked *hows that for a week* 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now