Jump to content
Sign in to follow this  
bobek

how to check whether control exists

Recommended Posts

bobek

How to check if any particular control exists on a screen?

Ususally, all control of a window are displayed immediately after activating window but not in my example.

Im creating a new window and controls(objects) are retrieved from database which takes some time and then displayed in window.

Therefore it doesn't work:

WinWaitActive("login")

ControlSend("login", "", "OK", "{ENTER}")

Right now Im adding one additional line and tell app to sleep [e.g sleep(2000)] but it's not a nice and flexible solution

Share this post


Link to post
Share on other sites
evilertoaster

somthing like

do
until ControlGetHandle ( whatever )<>""

edit: nm guess larry got it

Edited by evilertoaster

Share this post


Link to post
Share on other sites
bobek

That works fine, thanks guys!!

However, i have trouble with identifying controls.

ControlID is different everytime i run project, ClassNameNN remains the same, but is different on different computers the project is working on.

i can use text property for buttons but what about textboxes and so on?

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.