Magikarp7 Posted September 15, 2017 Share Posted September 15, 2017 Here is my code for one function: Func Tracker() ; tracks if a new and similar IE window is opened. Global $StartUp = WinGetHandle("[Class:IEFrame;Title:FTD - Single Sign-On]") If $windowNumber = 0 And WinExists($StartUp) Then Local $winListT = WinList() $winIndexT = _ArrayFindAll($winListT,"Sign-On",Default,Default,Default,3,0) If UBound($winIndexT) = 2 Then $firstWdw = $winListT[$winIndexT[0]][1] $windowNumber = $windowNumber + 1 ;~ MsgBox(0,"","Handle is: " & $firstWdw) EndIf WinGetProcess If $windowNumber = 1 Then If WinExists("[Class:IEFrame;Title:FTD - Single Sign-On;Handle:"&$firstWdw&"]") Then ;~ MsgBox(0,"","Working till here!") Local $winListT2 = WinList() $winIndexT2 = _ArrayFindAll($winListT2,"Sign-On",Default,Default,Default,3,0) If UBound($winIndexT2) = 4 Then $firstWdw = $winListT[$winIndexT[1]][1] $secondWdw = $winListT[$winIndexT[0]][1] AdlibRegister("Qdetect") $windowNumber = $windowNumber + 1 ;~ MsgBox(0,"","First handle is: " & $firstWdw & " Second handle is: " & $secondWdw) AdlibUnRegister("Tracker") EndIf EndIf EndIf EndIf EndFunc The thing is I am trying to separate two instances of the "[Class:IEFrame;Title:FTD - Single Sign-On]" when I open a new window. But when I try to open another IE to open the same page. the program still recognizes the first window. I want the program to remember the first window and the newly opened window. Any tips? Link to comment Share on other sites More sharing options...
JohnOne Posted September 22, 2017 Share Posted September 22, 2017 Your code looks overly complicated. Look into WinList parameters ie Local $winListT = WinList("Sign-On") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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