svaneenoo Posted June 11, 2010 Posted June 11, 2010 Hi all,I have a script which installs an active x control as the local administrator.The company where I have implemented this upgraded some of the IE6 to IE8.Small difference in screen names.IE6: Microsoft Internet explorerIE8: Windows Internet Explorer.In the original script i have the code:WinWaitActive("Search Results - Microsoft Internet Explorer")WinClose ( "Search Results - Microsoft Internet Explorer")The sript is automatically called from within SAP. So I can not have two separate scripts.I cannot use an external file to indicate which IE8 they are running.Does anybody know if it is possible to wait for one screen, OR to wait for another screen. The first one it finds should be closed. Or would it be possible for autoit to find out which IE the user has installed, and based on that wait for the correct screen?something like: if IE=6 then winwait .. winclose....else winwait...wincloseThanks all for the helpStefaan
Authenticity Posted June 11, 2010 Posted June 11, 2010 ; Example 1 WinWait("[REGEXPTITLE:Search Results - (?:Microsoft|Windows) Internet Explorer]") $hWnd = WinGetHandle("[REGEXPTITLE:Search Results - (?:Microsoft|Windows) Internet Explorer]") ConsoleWrite("Closing window: " & $hWnd & @CRLF) WinClose($hWnd) ; Example 2 $aIE = WinList("[CLASS:IEFrame]") If IsArray($aIE) Then For $i = 1 To $aIE[0][0] If StringRegExp($aIE[$i][0], "Search Results - (?:Microsoft|Windows) Internet Explorer") Then ConsoleWrite("Closing window: " & $aIE[$i][1] & @CRLF) WinClose($aIE[$i][1]) EndIf Next EndIf
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