Jump to content

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


jrh
 Share

Recommended Posts

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

Link to comment
Share on other sites

use

Local $iD = @GUI_CtrlId
consolewrite($id&@Lf)

to get you id on what you have clicked.

but without seeing the code, we really are having to stab in the dark

Edited by Aceguy
Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...