option explicit
dim shApp, x
set shApp=createobject("shell.application")
For x=0 to shApp.windows.count-1
With shApp.windows.item(x)
If IsObject(.document.frames) Then
'This should close the google search page
If shApp.Windows.item(x).LocationName = "Google" Then
.document.frames.close
End If
End If
End With
'wscript.Echo shApp.Windows.item(x).LocationName
Next
option explicit
dim shApp, x, bTest
set shApp=createobject("shell.application")
For x=0 to shApp.windows.count-1
With shApp.windows.item(x)
on error resume next
bTest = IsObject(.document)
if err<>0 then bTest = false
on error goto 0
If bTest Then
'This should close the google search page
If .LocationName = "Google" Then
.document.parentWindow.opener = "me"
.document.frames.close
End If
End If
End With
Next
Tom Lavedas
===========
>.
>