Re: Automation of IE and detection of popups using VBScript
- From: mr_unreliable <kindlyReplyToNewsgroup@xxxxxxxxxxx>
- Date: Fri, 24 Jun 2005 17:23:32 -0400
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?
.
- Follow-Ups:
- Clarificaton
- From: mr_unreliable
- Re: Automation of IE and detection of popups using VBScript
- From: llamaflaca
- Re: Automation of IE and detection of popups using VBScript
- From: shadowHead
- Clarificaton
- References:
- Automation of IE and detection of popups using VBScript
- From: llamaflaca
- Automation of IE and detection of popups using VBScript
- Prev by Date: WMI to create or modify text file remotely
- Next by Date: Re: How to filter-out multiple lines based on specific words ( en equivalent of egrep -v of shell )
- Previous by thread: Automation of IE and detection of popups using VBScript
- Next by thread: Re: Automation of IE and detection of popups using VBScript
- Index(es):
Relevant Pages
|