Link to home
Start Free TrialLog in
Avatar of CaitlinRoberts
CaitlinRoberts

asked on

VBScript - Find IE window

I was wondering if anyone knew how to find if a certain IE window is open (by it's window title) using VBScript.

I'm looking for the VBScript equivalent of this this VB.net code:

Dim IE() as Process
Dim n as Integer
Dim bOpen As Boolean = False
IE = Process.GetProcessesByName("IEXPLORE")
If IE.Length > 0 Then
    For n = 0 to IE.Length - 1
        If IE(n).MainWindowTitle.StartsWith("Website A") Then
            MsgBox("Website A is open")
            Exit For
        End If
    Next
End If

THANKS!!!
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CaitlinRoberts
CaitlinRoberts

ASKER

Perfect!  Thanks AzraSound!