Jump to content
Sign in to follow this  
jrh

How to discover Control Id which is diffrent every time you active the application

Recommended Posts

jrh

I have an application which the Control ID changes everytime you fire up the application.

How do i go about retrieving this dynamically.

Thanks

Share this post


Link to post
Share on other sites
youknowwho4eva

Depends what your trying to do. What's the program, and what are you trying to do? What script do you have so far?


Giggity

Share this post


Link to post
Share on other sites
jrh

Depends what your trying to do. What's the program, and what are you trying to do? What script do you have so far?

Program is a Windows thick client developed in c#. Once i've logged in the main page of the application has tree control.

The id of the tree control changes everytime you fire it.

The tree control is key as all the data sits within the the tree.

Scriptwise - nothing much just been playing about with the tree control functions but with ID which i have to update manually.

I will put up a script once it does something meaningful. In the meantime any help on dynamically retrieving Id would be useful.

Thanks

Share this post


Link to post
Share on other sites
SmOke_N

First check to see if the ClassNameNN changes on every startup, if it doesn't then use that instead.

Otherwise, use the controls position to find its handle/class id/classnamenn by that position ... _CtrlGetByPos() : http://www.autoitscript.com/forum/index.ph...l=_ctrlgetbypos


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
jrh

Thanks for the leads folks.

Will test and feedback in the forum.

Thanks

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  

×