Re: Automation of IE and detection of popups using VBScript



hi llamaflaca,

If you know the captions of the popup windows, you could use AppActivate
as a function, to detect their presence.

A better bet would be just to use one of the free (or commercial) popup
blockers.

Otherwise, you might be better off writing your "script" in vb (or some
other language allowing api calls), where you could use api's to detect the appearance of popup windows. For example, I wrote a script to
dismiss cookie alerts from IE, but I was using a third-party control
to call api's from script. My script will also dismiss zone alarm
alerts, using the same technique. (I could just turn off the alerts,
but I prefer to see them briefly, so as to know what's really going
on).


As for firefox, imho it already does a great job of blocking popups.

cheers, jw
____________________________________________________________

You got questions?  WE GOT ANSWERS!!!  ..(but,
   no guarantee the answers will be applicable to the questions)





llamaflaca wrote:
I am working on a simple VBScript that instantiates IE 6. My script then proceeds to “drive” IE by reading urls from a text file. I use this script for testing various websites. The problem is that from time to time I come across sites with popups of various forms. Can I detect new IE windows being fired up by these sites and either kill them off or do a KeySend (or is it SendKey) to simple click CANCEL?

I have seen another script that fetches off the window handles as in win.HWND. Would this be a way? And if so, once I fetch of the handle, how do I manipulate (i.e. kill ) the new window by using its handle?

Thanks

P.S. can something similar be done for Firefox? Is there a vbscript that "drives" firefox?

.



Relevant Pages

  • Re: Fullscreen and screen saver
    ... except when other windows pop up. ... Same thing happens when the bluetooth device ... >>stepped through all uncatched events when closing the popup windows, ...
    (microsoft.public.pocketpc.developer)
  • Re: Fullscreen and screen saver
    ... except when other windows pop up. ... Same thing happens when the bluetooth device ... >stepped through all uncatched events when closing the popup windows, ...
    (microsoft.public.pocketpc.developer)
  • Re: Help diagnosing UI non-response
    ... > that they started happening after Windows XP service pack 2. ... virus software before login (as evidenced by popup windows before the ... login screen appeared when I installed the free Sygate firewall). ... Sygate was buggy with SP2 also (not remembering that I wanted popups ...
    (microsoft.public.windowsxp.general)
  • Re: Fullscreen and screen saver
    ... except when other windows pop up. ... Same thing happens when the bluetooth device ... > stepped through all uncatched events when closing the popup windows, ...
    (microsoft.public.pocketpc.developer)
  • RE: Sending SNMP alerts from Win 2003?
    ... Configure the Simple Network Management Protocol (SNMP) Service ... There is a net-snmp for windows you may want to check out: ... Sending SNMP alerts from Win 2003? ... '--'Can I send SNMP traffic from a WMI script or Resource Kit tool? ...
    (microsoft.public.windows.server.networking)