Sign in to follow this  
Followers 0
Foaman

IF there's a button THEN press it?

5 posts in this topic

I'm trying to use the information I'm gathering from AutoIt v3 Active Window Info. I'm a gamer, as everyone knows. I am trying to level my character, of course. Under "Control Under Mouse", I find that I want to Mouse Click Left on anything with a ClassNameNN of Button001 through Button500. After that, the buttons begin to change into things my character shouldn't press, lest he die. How can I set up AutoIt v3 so that it scans from x1 to x2 and from y1 to y2 for buttons 001 through 500, until one is found, then preforms a Mouse Click Left on said button? I can do the infinite loop thing, already, and I can get mouseclicks. I just don't know how to scan for buttons and report them as what needs to be clicked on.

I should probably mention that the buttons don't show up in the ClassNameNN, unless I am holding down the Shift key.

Is this possible? ;)

Share this post


Link to post
Share on other sites



Can you not search for buttons by text?

Share this post


Link to post
Share on other sites

I was trying to follow the example you had listed above but the issue I was having is the "button" i am trying to click is in Java.

img_ready = new Image();

img_not_ready = new Image();

img_ready.src = "http://imgo.darkthrone.com/betatemplates/default/images/buttons/recruit1.gif";

I need to be able to click the recruit1.gif

the way I had it before was just mouse to a co-ordinate and click sleep(5000) click again.

I would rather set it to click when the gif appears.

can you help me with this or do I need to read more about the scripting?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0