Jump to content
Sign in to follow this  

winwait IE6 and IE8

Recommended Posts


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 explorer

IE8: 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...winclose

Thanks all for the help


Share this post

Link to post
Share on other sites

; Example 1
WinWait("[REGEXPTITLE:Search Results - (?:Microsoft|Windows) Internet Explorer]")

$hWnd = WinGetHandle("[REGEXPTITLE:Search Results - (?:Microsoft|Windows) Internet Explorer]")
ConsoleWrite("Closing window: " & $hWnd & @CRLF)

; 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)

Share this post

Link to post
Share on other sites


i will try this.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this