Sign in to follow this  
Followers 0
jreedmx

Getting around a dynamic controlID

5 posts in this topic

#1 ·  Posted (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=[].
 
 
 
 
 
Edited by jreedmx

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
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.

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  
Followers 0