Jump to content
Sign in to follow this  
yosefk

press button dependent on its caption

Recommended Posts

yosefk

i want autoit to press a button of an external application when this button's caption equals a certain text.

how to do this?

Share this post


Link to post
Share on other sites
yosefk

Use Au3Info to get the info, then use the functions WinExists, ControlClick.

what i meant is that i've got a button (in a window) that might have either the caption "connect" or "disconnect". i want to press the button when it has the caption "connect" and not do anything when it has the caption "disconnect".

Share this post


Link to post
Share on other sites
KaFu
yosefk

Use Au3Info to get details on control...

if ControlGetText ( "title", "text", controlID ) = "Connect" Then ControlClick( "title", "text", controlID )

it took a while to get the syntax right - this works great! - thanks a lot

Share this post


Link to post
Share on other sites
somdcomputerguy

it took a while to get the syntax right..

With any autoit code examples posted, you can click the functions to goto that part in the online docs.

Here, I'll try to explain..

MsgBox(4096, "", "AutoIt rocks!") ; Click on MsgBox

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
yosefk

With any autoit code examples posted, you can click the functions to goto that part in the online docs.

Here, I'll try to explain..

MsgBox(4096, "", "AutoIt rocks!") ; Click on MsgBox

learned some more how autoit works

learned some more how this forum works

still a long way in front of me

but thanks for showing me the right direction

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.