Jump to content

Getting around a dynamic controlID

Recommended Posts



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")
ControlTreeView("Window ", "", 9306824, "Collapse")
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=[].
Edited by jreedmx
Link to comment
Share on other sites

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.
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

  • Recently Browsing   0 members

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