Sign in to follow this  
Followers 0
svaneenoo

winwait IE6 and IE8

3 posts in this topic

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

Stefaan

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

Share this post


Link to post
Share on other sites

Thanks.

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  
Followers 0