sumitd Posted August 6, 2013 Share Posted August 6, 2013 How do i differentiate between 2 windows with same name/title ? Though both have same name but content and processing fields is different. And 1 of the window may not appear all the time while the script executes. Tried with WinWaitActive ( "<title>" , " " , 1000 ), but not able to differentiate. Any suggestions? Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 Hi,Each window has a handle which is unique, you can do a WinList with a title then keep the handles when you have differentiated the windows.Br, FireFox. Link to comment Share on other sites More sharing options...
spudw2k Posted August 6, 2013 Share Posted August 6, 2013 Perhaps WinGetText or WinGetClassList may be of use. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Gianni Posted August 6, 2013 Share Posted August 6, 2013 hi sumitd have you tryed to use the second parameter of the WinWaitActive() function?, it is used to search a text inside the windows body instead of only the title bye Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
sumitd Posted August 6, 2013 Author Share Posted August 6, 2013 hi Prodigy, I tried with the text option in WinWaitActive() function, but it doesn't seem to differentiate. FireFox, how do I use WinList and the handle to differentiate between windows? (In my case 1 of the window may not appear all the time) Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 (edited) I don't know what you mean by "not appear", if this mean hidden then try this :Local $aWl = WinList("mytitle") If $aWl[0][0] = 0 Then Exit 1 Local $hWndNotAlwaysVisible = 0 While 1 For $i = 1 To $aWl[0][0] If IsVisible($aWl[$i][1]) = 0 Then $hWndNotAlwaysVisible = $aWl[$i][1] ExitLoop 2 EndIf Next Sleep(10) WEnd WinSetState($hWndNotAlwaysVisible, "", @SW_SHOW) Func IsVisible($hWnd) If BitAND(WinGetState($hWnd), 2) Then Return 1 Return 0 EndFunc ;==>IsVisibleBr, FireFox. Edited August 6, 2013 by FireFox Link to comment Share on other sites More sharing options...
adom Posted August 6, 2013 Share Posted August 6, 2013 If it is possible use a hidden label and search for this text in a loop of Winlist. Then get hwnd of the win you want to identify. Greetings Adom Thanks! :bye: Greetings Andrew Link to comment Share on other sites More sharing options...
sumitd Posted August 6, 2013 Author Share Posted August 6, 2013 Firefox, The window is not hidden. What I meant was that the windows are a part of installation process and both window pop out if only a previous installation is detected, else only 1 of the window appears in the installation process. ~sumitd Link to comment Share on other sites More sharing options...
FireFox Posted August 6, 2013 Share Posted August 6, 2013 hm. The only way for you to differentiate them is to read their text using the ControlGetText function (use the Au3Info tool for that). Br, FireFox. Link to comment Share on other sites More sharing options...
spudw2k Posted August 7, 2013 Share Posted August 7, 2013 What am I, chopped liver? Perhaps WinGetText or WinGetClassList may be of use. Have you looked at those functions yet? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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