hellomotto Posted October 14, 2017 Share Posted October 14, 2017 Uh, okay. First of all, I am a complete noobie. I don't even know what language AutoIT is using so you can imagine what kind of a coding noobie I am. I did some research around AutoIT and came across some post regarding this matter but I do not understand them at all or am able to make my own scripts. What I want to achievein the end. Click randomly in first defined pixel box (ex. left corner (x,y) (600,1068) Right corner (x,y)(617,1052) Random sleep time (15, 35, 1) ;No idea if this is correct. I want random ms between 15-35. Click randomly in second defined pixed box (ex. let corner (x,y) (929,73) Right corner (x,y) (947,55) Random sleep time between 35ms-60ms Loop My current progress... Please bare with my codes...... I can't even get the random clicks to work within a big box The WinActiavte is an online whiteboard I found. I drew a rectangle and want random clicks within the rectangle to try out the random factors. Quote HotKeySet ("{ESC})", "StopScript") WinActivate("AWW App | Online Whiteboard for Realtime Visual Collaboration - Mozilla Firefox") Func RandomClick ($x, $y) $y_pos = Random(284, 663, 1) $x_pos = Random(582,270, 1) MouseClick("left", $x, $y) EndFunc RandomClick () Sleep (500) Func StopScript () msgbox (0,"Exiting", "Stopping script") Exit EndFunc Please. Superman. I need help Link to comment Share on other sites More sharing options...
hellomotto Posted October 14, 2017 Author Share Posted October 14, 2017 Sorry I was meant to say, bottom left corner and top right corner. Link to comment Share on other sites More sharing options...
hellomotto Posted October 14, 2017 Author Share Posted October 14, 2017 I stumbled onto another post and it helped me immensely. I guess post close. I got the result I wanted, but if there's any brushing up that can be done, please comment! Quote HotKeySet ("{ESC})", "StopScript") WinActivate("AWW App | Online Whiteboard for Realtime Visual Collaboration - Mozilla Firefox") while (1) MouseClick("left", Random(120, 155, 1), Random(729, 767, 1), 1) Sleep (Random(80, 130, 1)) MouseClick("left", Random(485, 528, 1), Random(495, 542, 1), 1) Sleep (Random(2000, 2500, 1)) WEnd Func StopScript () msgbox (0,"Exiting", "Stopping script") Exit EndFunc 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