Jump to content
Sign in to follow this  
simple

how to detect Hidden Buttons when they show up

Recommended Posts

simple

You know how online games usually have a launcher with a "connect" button thats hidden until it establishes a connection to the game server or somthing before showing it out.

how to use autoit to detect when the button shows up instead of guessing the delay time and without pixel detection?

also when i use

ControlSend("GAME", "", "Button1", 'MouseClick ("Left")' )

it beeps about 10 times before it clicks the button, the button wasnt even hidden and it causes bit of trouble. and if i set a delay for the clicks it wont work at all it just beeps every few sec

Share this post


Link to post
Share on other sites
LxP

This line:

ControlSend("GAME", "", "Button1", 'MouseClick ("Left")' )

is equivalent to tabbing to the button with your keyboard and typing M o u s e C l i c k.... I believe you want ControlClick().

Try this out for size:

While Not ControlCommand('GAME', '', 'Button1', 'IsVisible')
    Sleep(100)
WEnd
ControlClick('GAME', '', 'Button1')

Share this post


Link to post
Share on other sites
LxP

Thanks for the compliment! :">

For anyone else who stumbles on this thread wanting to wait for a greyed-out button to become available, the above example can be adapted by changing IsVisible to IsEnabled.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.