jreedmx Posted January 7, 2015 Posted January 7, 2015 (edited) Hello, I have an application that has dynamic window controlID's, so that each time I close and reopen the application the controlID has changed and my AutoIT script no longer works. Is there a way to write a script that can find out what the controlID is and then have it run into the already existing script automatically? Run('C:Program FilesmyCompanymyApplicationFoldertheApplication.exe') _WinWaitActivate("Window ","text ") WinActivate("Window ","text ") ControlTreeView("Window ", "", 9306824, "Expand") Sleep(1500) ControlTreeView("Window ", "", 9306824, "Collapse") Sleep(1500) ;----------------------------------------------------------------------------------------------------- Func=[GetAllWindowsControls]: ControlCounter=[ 18] ControlID=[9306824] Handle=[0x008E02C8] ClassNN=[WindowsForms10.SysTreeView32.app.0.fcf9a41] XPos=[-9990] YPos=[-9938] Width=[ 469] Height=[ 202] IsVisible=[0] Text=[]. https://www.autoitscript.com/autoit3/docs/functions/ControlTreeView.htm Edited January 7, 2015 by jreedmx
jguinch Posted January 7, 2015 Posted January 7, 2015 Can you post here the result of the WinGetClassList command? Reveal hidden contents Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Blue_Drache Posted January 7, 2015 Posted January 7, 2015 What program are you trying to automate? Perhaps if you weren't being so vague about it, we could help. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
jguinch Posted January 7, 2015 Posted January 7, 2015 The ClassNN WindowsForms10.SysTreeView32.app.0.fcf9a41 is the same each time you launch your app, or it changes to ? Reveal hidden contents Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
jdelaney Posted January 7, 2015 Posted January 7, 2015 I think you might have pasted in the wrong systreeview control. The one you posted seems to be intentionally outside the bounds of the viewable window, and isvisible=0. Provide the output for all of that control class. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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