randallc Posted March 15, 2008 Share Posted March 15, 2008 Hi, I have an App with a number of instances of same name/ ID SysListView32 on different tabs/ achild windows. 3.2.11.2 seems to retrieve a different instance; can I specify this better? WinActivate('Medical') Local $WindowHwnd = HWnd(WinGetHandle('Medical')) If @error Then ConsoleWrite("@error $WindowHwnd@error=" & @error & @LF) ConsoleWrite("$WindowHwnd =" & $WindowHwnd & @LF) Local $TabControl_HWnd = ControlGetHandle($WindowHwnd, '', '[Class:SysTabControl32;Instance:1]') If @error Then ConsoleWrite("@error $TabControl_HWnd @error=" & @error & @LF) ConsoleWrite("$TabControl_HWnd =" & $TabControl_HWnd & @LF) ControlSend('Medical', "", $TabControl_HWnd, "!l!x"); 'Curr&x' Local $FileListView_HWnd = ControlGetHandle($WindowHwnd, '', '[Class:SysListView32;Instance:8]');100); If @error Then ConsoleWrite("@error $FileListView_HWnd @error=" & @error & @LF) Local $d = 0, $i = 0, $colCount = _GUICtrlListView_GetColumnCount($FileListView_HWnd), $i, $aItems[100] Working in 3.2.11.1 $WindowHwnd =0x0078049C $TabControl_HWnd =0x00A405D6 Col Count: 20 for $FileListView_HWnd=0x019D0606Not Working in 3.2.11.2 $WindowHwnd =0x0078049C $TabControl_HWnd =0x00A405D6 Col Count: 7 for $FileListView_HWnd=0x00620792So it retrieves a different instance with 7 cols instead of 20 cols Class SysListView32 Instance 8 ClassNameNN SysListView328 ID 100 Class SysListView32 Instance 8 ClassNameNN SysListView328 ID 111Only the ID is different here (in fact sometimes the same, but not for this problem;) But I can't seem to retrieve it using ID alone.. Is there some syntax method I am missing here? Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
jpm Posted March 17, 2008 Share Posted March 17, 2008 Hi, I have an App with a number of instances of same name/ ID SysListView32 on different tabs/ achild windows. 3.2.11.2 seems to retrieve a different instance; can I specify this better? WinActivate('Medical') Local $WindowHwnd = HWnd(WinGetHandle('Medical')) If @error Then ConsoleWrite("@error $WindowHwnd@error=" & @error & @LF) ConsoleWrite("$WindowHwnd =" & $WindowHwnd & @LF) Local $TabControl_HWnd = ControlGetHandle($WindowHwnd, '', '[Class:SysTabControl32;Instance:1]') If @error Then ConsoleWrite("@error $TabControl_HWnd @error=" & @error & @LF) ConsoleWrite("$TabControl_HWnd =" & $TabControl_HWnd & @LF) ControlSend('Medical', "", $TabControl_HWnd, "!l!x"); 'Curr&x' Local $FileListView_HWnd = ControlGetHandle($WindowHwnd, '', '[Class:SysListView32;Instance:8]');100); If @error Then ConsoleWrite("@error $FileListView_HWnd @error=" & @error & @LF) Local $d = 0, $i = 0, $colCount = _GUICtrlListView_GetColumnCount($FileListView_HWnd), $i, $aItems[100] Working in 3.2.11.1 Not Working in 3.2.11.2 So it retrieves a different instance with 7 cols instead of 20 cols Only the ID is different here (in fact sometimes the same, but not for this problem;) But I can't seem to retrieve it using ID alone.. Is there some syntax method I am missing here? Best, RandallHi, Difficult to find the difference without having such specific windows. The modifications done in .2 is only when scnning the pattern. No change in in the matching mechanism Can you send a script reproducing the behavior of such Tab/listview? Link to comment Share on other sites More sharing options...
randallc Posted March 17, 2008 Author Share Posted March 17, 2008 (edited) Hi, I don't know how to write an app with those controls ["SysTab32" and "SysListView32"], if that is your question.. 1. From another program, the controls are distinguished by the tab name being identified; ("Rx" and "Progress" respectively in control definition) <GETCONTROLP:01:MDW3.EXE:007:ShellWindowMedicalMDIClientDocAppWindow Blood Donor Bd 4005649WndAppWindow#32770#32770Rx SysListView32> <GETCONTROLP:01:MDW3.EXE:007:ShellWindowMedicalMDIClientDocAppWindow Blood Donor Bd 4005649WndAppWindow#32770#32770ProgressSysListView32> 2. "Info" in scite gives a control hex number; but using that as the handle does not work (not as number, hex of string, or string); is there a way of using that? 3. what do you mean that 11.2 "reads" differently? thanks, Randall Edited March 17, 2008 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
jpm Posted March 17, 2008 Share Posted March 17, 2008 Hi, I don't know how to write an app with those controls ["SysTab32" and "SysListView32"], if that is your question.. 1. From another program, the controls are distinguished by the tab name being identified; ("Rx" and "Progress" respectively in control definition) 2. "Info" in scite gives a control hex number; but using that as the handle does not work (not as number, hex of string, or string); is there a way of using that? 3. what do you mean that 11.2 "reads" differently? thanks, RandallCtrlTab and CtrlListview can perhaps do the same as your application is doing. Can you post pictures of the window so I can see on what it is working on. I assume at least the initial and after the controlsend Link to comment Share on other sites More sharing options...
randallc Posted March 17, 2008 Author Share Posted March 17, 2008 (edited) Hi,I guess; I'll have to see if there are example scripts out there with 2 ListViews on different tabs; I'll look.oK i'll try to pm or attch screenshots; not very good at it and will have to nut it out.the "initial screen", when I am running it, is the same as after controlsend; I only put that there in case the initial is ever not that tabWhy it takes the sysListView32 from the other tab is unclear; appears to be nothing to do with it ever having been visible, though!randallPS2. "Info" in scite gives a control hex number; but using that as the handle does not work (not as number, hex of string, or string); is there a way of using that?Any thoughts? Edited March 17, 2008 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
randallc Posted March 17, 2008 Author Share Posted March 17, 2008 CtrlTab and CtrlListview can perhaps do the same as your application is doing.No, I don't think i can replicate it.If I put 2 LVs on different tabs with AutoiTt, the second one become "instance2", not a second "instance1"best, randallPS I have PMd the screen shots.. ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Administrators Jon Posted March 19, 2008 Administrators Share Posted March 19, 2008 Something's wrong here. If I debug this: ControlDisable($handle, "", "[Text:D&efault; Class:Button]") It never reads the Class: property. I'll take a look. Edit: I see it. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ 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