Here is something I came up with a few months ago on the same thing... This
is old code and I did not retest it... It lets you define a list of domain
that is okay for popups from...
Robert
Const ForReading = 1
on error resume Next
strFileName = "DomainList.txt "
Set objFSO = CreateObject("S cripting.FileSy stemObject")
Set objDictionary = CreateObject("S cripting.Dictio nary")
Set objArgs = WScript.Argumen ts
If objArgs.Count > 0 Then
If objFSO.FileExis ts(objArgs(0)) Then
strFileName = objArgs(0)
End If
End If
If objFSO.FileExis ts(strFileName) Then
Set objTextFile = objFSO.OpenText File(strFileNam e, ForReading)
Do While objTextFile.AtE ndOfStream <> True
strNextLine = lcase(trim(objT extFile.Readlin e))
'Checking the length to avoid adding blank lines...
If Len(strNextLine ) > 0 Then
objDictionary.A dd strNextLine,str NextLine
End If
Loop
End If
For Each objItem in objDictionary
WScript.Echo "Domain : " & Trim(objDiction ary.Item(objIte m))
Next
Set J=CreateObject( "Shell.Applicat ion")
Do
WScript.StdOut. Write Now
WScript.Sleep 900
WScript.StdOut. Write String(Len(Now) ,Chr(8))
For L=0 to J.windows.count-1
With J.windows.item( L)
If IsObject(J.wind ows.Item(L).doc ument.frames) Then
If isObject(J.Wind ows.Item(L).doc ument.frames.op ener) Then
If
objDictionary.E xists(lcase(J.W indows.Item(L). Document.Domain )) Then
'WScript.Echo Now & " Popup window from protected domain " &
J.Windows.Item( L).Document.Dom ain
Else
WScript.Echo Now & " Closing Popup Window from " &
J.Windows.Item( L).Document.Dom ain
J.Windows.Item( L).document.fra mes.close
End If
End If
End If
End With
Next
Loop
<an*******@cool groups.com> wrote in message
news:f1******** *************** *******@news.sc biz.com...
Does anyone know where I can find some VB source for
blocking popups in IE?