Jump to content

how to detect Hidden Buttons when they show up

Recommended Posts

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

Link to post
Share on other sites

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')
ControlClick('GAME', '', 'Button1')
Link to post
Share on other sites

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.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...