Garicup Posted December 20, 2008 Share Posted December 20, 2008 Hi, I'm new to the forums but not completely new to Autoit. I've never really done anything complicated with Autoit, so my question might have an extremely trivial solution. Im writing a script, I want it to randomly click spots within a defined area example: I have a box on the screen, say (200, 210, 300, 310) [x,y(top left), x,y(bottom right)] and I want it to repeatedly click in between that box at random spot using the Mouseclick function or other clicking functions. How would I do this? ((I want it to say: Click "239, 284" then 256, 301....and so on and so forth....inside a given area at random...)) or easily put, I want random clicking, but controlled as to where the randomness extends to I know the example isn't aimed at a specific situation but hopefully the idea of what I'm trying to do passes through. I just want to know if it can be done and how, I don't want it specifically done for my project. Any help is appreciated, Thanks Link to comment Share on other sites More sharing options...
Bert Posted December 20, 2008 Share Posted December 20, 2008 (edited) Try this - $x = random(239, 256) $y = random(121, 150) $speed = Random(1, 4);so the movement of the mouse is at random speed too Mouseclick($x, $y, 1, $speed) Also, look in the example script section for AutoIt 1 2 3. It is a sticky. It will teach you the basics. Edited December 20, 2008 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Garicup Posted December 20, 2008 Author Share Posted December 20, 2008 Thanks that works like a charm, also going through the example scripts now. Much Appreciated. Link to comment Share on other sites More sharing options...
Bert Posted December 20, 2008 Share Posted December 20, 2008 Glad to help. Welcome to the forum! The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
nfaustin Posted December 20, 2008 Share Posted December 20, 2008 I had similar problem in identifying text on image/picture on active windows such as webpage on realtime. Hope this post could discuss more further... [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font] Link to comment Share on other sites More sharing options...
nfaustin Posted December 20, 2008 Share Posted December 20, 2008 I had similar problem in identifying text on image/picture on active windows such as webpage on realtime.Hope this post could discuss more further... I mean, I can select click the picture without saving first the image(like other post using OCR script). [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font] 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