Jump to content

_IECreateEmbedded() + Blocking PopOuts/PopUps..?


Recommended Posts

is there anyway at all to monitor _IECreateEmbedded() inside a GUI to try and block PopOut Windows that occur when you view a page that contains code to generate a PopUp IE window when its viewed..??

I noticed if I set the IE settings to turn off active scripting it seems to block popups but i need active scripting enable for IE though.. so what other things could i do to block the popouts of the IE object thats embedded into the GUI..??

Link to comment
Share on other sites

It may seem that there ought to be, but there is no "turn off pop-ups" setting anywhere. You need to dig in and find all of the specific methods and triggers used to create the pop-ups and address each one. You can typically do something about any and all of them, but it may be complex. So again, it depends on the page source and it will vary depending on whether they are alert boxes, navigation windows, print dialogs etc.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

well most of the popups are IE windows without any navigation buttons or URL bars on them Ect.. that get generated from Javascript Code by just viewing the webpage...

What all would i need to know or do to tackle Javascript generated IE PopUp windows when using _IECreateEmbedded() in a GUI..??

Link to comment
Share on other sites

Show an example. I can help you with a specific case, I'm not going to write a book about it.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

how would you block some popup code like this..??

<div style="text-align:center;padding:10px 0;width:100%;" onmouseover="trackMouseover();" onmouseout="trackMouseout();">
<!-- START ADULTADWORLD.COM CODES -->

  <script src="http://cluster.adultadworld.com/includes/adultadworldpop_z.js"></script>
  <script language="javascript">adultadworldpop(10404,2437);</script>
<!-- END ADULTADWORLD.COM CODES -->

So how come the _IECreateEmbedded() function doesn't honor the settings that you set in the IE Options, when you set it to block all popups..??

Link to comment
Share on other sites

So I can now guess why you are trying to be so cryptic in your questions. In the future, please try to find another site that exhibits the same behaviour that you are willing to talk openly about so that you don't speak in riddles.

You don't say, but I'll assume your trouble is when you mouse over something. This simple technique will override the offending script with your own no-op.

IEHeadInsertScript($oIE, "function trackMouseover(){return;}")
IEHeadInsertScript($oIE, "function trackMouseout(){return;}")

Func IEHeadInsertScript($o_object, $s_script)
    Local $o_head, $o_element
    $o_head = _IETagNameGetCollection($o_object, "head", 0)
    $o_element = $o_object.document.createElement('script')
    $o_element.type = 'text/javascript'
    $o_element.text = $s_script
    Return $o_head.appendChild($o_element)
EndFunc

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

so how would i use your code.. like this or something..??

_IENavigate($IE, $URL, 0)
IEHeadInsertScript($IE, "function trackMouseover(){return;}")
IEHeadInsertScript($IE, "function trackMouseout(){return;}")
Link to comment
Share on other sites

would there be any way to just prevent iexplore.exe from being launched at all when a popout of the IE GUI tries to occur..??

because when the popups occur svchost.exe executes this command line ""C:\Program Files\Internet Explorer\IEXPLORE.EXE" -Embedding"

would it be possible at all to just prevent that command line from being passed onto svchost.exe or iexplore.exe or what ever is executing that code.. or do you gotta do it like the way you showed me by tackling each web-code the triggers the specific popup..??

Link to comment
Share on other sites

So I am to believe you wrote code using _IECreateEmbedded and you don't know what to do with the example I gave you?

Your last post is gibberish.

Sorry, I've got better things to do.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

So I am to believe you wrote code using _IECreateEmbedded and you don't know what to do with the example I gave you?

nah man .. im not sure how or where to use/insert your popup blocker code..?? i'm still learning how to use _IECreateEmbedded..

this is what i got so far, what do you see wrong with it..?? where do i use your code at..??

#NoTrayIcon
#include <IE.au3>

Do
$IE = _IECreateEmbedded()
_IELoadWaitTimeout(15000)
_IEPropertySet($IE, 'silent', True)
GUICreate("", 1100, 800)
GUICtrlCreateObj($IE, 0, 0, 1100, 800)
GUISetState()
_IENavigate($IE, "about:Blank")
Until Not @error

_IENavigate($IE, "http://PopUpWebPage.com", 0)
IEHeadInsertScript($IE, "function trackMouseover(){return;}")
IEHeadInsertScript($IE, "function trackMouseout(){return;}")



Func IEHeadInsertScript($o_object, $s_script)
    Local $o_head, $o_element
    $o_head = _IETagNameGetCollection($o_object, "head", 0)
    $o_element = $o_object.document.createElement('script')
    $o_element.type = 'text/javascript'
    $o_element.text = $s_script
    Return $o_head.appendChild($o_element)
EndFunc
Link to comment
Share on other sites

This is the correct sequesnce (although I don't know what you are trying to do with the Do.. Until loop). You'll need to take out the $f_wait = 0 in _IENavigate however. You need the page to have loaded in order to inset the override scripts.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...