jrh Posted February 5, 2009 Share Posted February 5, 2009 I have an application which the Control ID changes everytime you fire up the application. How do i go about retrieving this dynamically. Thanks Link to comment Share on other sites More sharing options...
youknowwho4eva Posted February 5, 2009 Share Posted February 5, 2009 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 Link to comment Share on other sites More sharing options...
jrh Posted February 5, 2009 Author Share Posted February 5, 2009 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 More sharing options...
Aceguy Posted February 5, 2009 Share Posted February 5, 2009 (edited) 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 February 5, 2009 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 5, 2009 Moderators Share Posted February 5, 2009 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 More sharing options...
jrh Posted February 5, 2009 Author Share Posted February 5, 2009 Thanks for the leads folks. Will test and feedback in the forum. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now