DroidFanBoyJP Posted May 1, 2011 Share Posted May 1, 2011 Basically I am wanting to left click in an area, but for it to be random everytime. I am somewhat new to AutoIt, and have searched all of google and this site for this. Right now I am using: If Random(0, 1, 1) Then MouseClick("left", 721, 317, 1) Else MouseClick("left", 735, 332, 1) EndIf But that is only 2 spots. I want it to be 100% random, within the area. Thanks in advance for any help. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 1, 2011 Share Posted May 1, 2011 (edited) You can use returns from the Random function as MouseClick parameters. Like this MouseClick("left", Random(600, 700, 1), Random(300, 400, 1), 1) Edited May 1, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
DroidFanBoyJP Posted May 1, 2011 Author Share Posted May 1, 2011 Yep figured that out about 2 hours after the post, thanks a ton though. Loving this Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 1, 2011 Share Posted May 1, 2011 You bet. Welcome to the Forum and Good luck! - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
DroidFanBoyJP Posted May 2, 2011 Author Share Posted May 2, 2011 Thank you! 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