Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: differentiate child windows
I have used the windows analysis script to run on my program.
Run( 'WordPad.exe', '' ) Run( 'WordPad.exe', '' ) LookingFor = 'WordPad' list = WinItemNameId( ) listcount = ItemCount(list,'|') ID1 = 'NOT FOUND' ID2 = 'NOT FOUND' IDX = 1 For xx=1 To listcount By 2 thisname = ItemExtract(xx, list, '|' ) thisid = ItemExtract( xx+1, list, '|' ) If StrIndex( thisname, LookingFor, 1, @FWDSCAN ) ID%IDX% = thisid IDX = 2 EndIf Next Message('Parent Window IDs', ID1:@CRLF: ID2) ;Now we have the ID's of the two windows. Now we have to tell which is which. ID1List=WinItemChild(ID1) If ItemCount( ID1List, @TAB ) == 0 Pause( '[Window 1] : ':ID1, 'No Child Windows Found' ) Else AskItemlist( '[Window 1] : ':ID1, ID1List, @TAB, @SORTED, @SINGLE ) EndIf ID2List=WinItemChild(ID2) If ItemCount( ID2List, @TAB ) == 0 Pause( '[Window 2] : ': ID2, 'No Child Windows Found' ) Else AskItemlist( '[Window 2] : ':ID2, ID2List, @TAB, @SORTED, @SINGLE ) EndIf ;Clean up WinClose( ID1 ) WinClose( ID2 ) Exit
Article ID: W12510
Filename: How to Differentiate 2 Child Windows with Same Name.txt
File Created: 2012:11:09:13:45:22
Last Updated: 2012:11:09:13:45:22