EvilOniLink Posted July 28, 2015 Share Posted July 28, 2015 I just started Autoit about two weeks ago so I basically don't know squat and that makes this much harder but bare with me if you can.I want help making a line of script that will tell the mouse to click a random spot within a preset coordinates but then I want it to click a second point that is also random but relative to the first click. In other words, the first click will open up a menu that is always positioned relative to the click, the second click must then also be relative to the first so that it can pick the right option.This is what I have so far to get the first click, right now it is set up to be continuous as that is what I'll need.While 1 $posx = Random(1204, 1230) $posy = Random(446, 461) MouseMove($posx, $posy) MouseClick("primary") Sleep(Random(1250, 1600, 1))WEndSo after this makes the first click which is random, I want the mouse to move down a little bit and click again. It'd be really great if it could move a random amount down and to the left or right. Thank you to anyone that even attempts to help me. Link to comment Share on other sites More sharing options...
aleph01 Posted July 28, 2015 Share Posted July 28, 2015 Can you not use ControlClick to choose the menu and/or the option? Meds. They're not just for breakfast anymore. Link to comment Share on other sites More sharing options...
EvilOniLink Posted July 28, 2015 Author Share Posted July 28, 2015 I don't believe so, leaning towards no. Link to comment Share on other sites More sharing options...
EvilOniLink Posted July 28, 2015 Author Share Posted July 28, 2015 I got this to work sort ofWhile 1 $posx = Random(629, 732) $posy = Random(222, 301) MouseMove($posx, $posy) MouseClick("secondary") Local $aPos = MouseGetPos() Sleep(Random(1250, 1600, 1)) MouseMove($aPos[0] - 20, $aPos[1] + 50) MouseClick("primary") Sleep(Random(19050, 19600, 1))WEndBut I would really like it if the $aPos[0] could be plus or minus any number between 1 and 100 and the $aPos[1] to be plus any number between 45 and 50. Link to comment Share on other sites More sharing options...
EvilOniLink Posted July 28, 2015 Author Share Posted July 28, 2015 I figured it out! Link to comment Share on other sites More sharing options...
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