intime69 0 Posted December 19, 2010 (edited) Hi,I am fairly new to the forum. I know that this topic has been dealt with previously but there has never been a clear answer regarding this. As the title says, I am trying to prevent IE from opening when a New Window is called via a link while running an Embedded IE Object. Preventing IE from opening seems to be a fairly difficult task... I am therefore offering $50 US to whom ever can figure this out. You must submit a working AutoIT Script that will show an Embedded IE Object opening a New Window (within the Embedded IE Object) without Internet Explorer opening.If several solutions are submitted, I will pick out the best one and the winner will get $50 US in their Paypal Account.Thanking in advance anybody that can help. It would be greatly appreciated!Ian, Developer and Co-ownerInTime Application Inc.P.S.: I want the best solution possible so VIP's, Moderators and Admins are allowed to participate. If you think that this can't be done, think harder. I am sure that there is a way to achieve this! AutoIT can almost do miracles. It's an awesome tool! Edited January 26, 2011 by intime69 Developer and Co-OwnerInTime Applicaitons Inc. Share this post Link to post Share on other sites
DCCD 2 Posted December 19, 2010 can be done for free [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Share this post Link to post Share on other sites
intime69 0 Posted December 19, 2010 can be done for freeIf you know how to do this, it would be great! With or without the reward... The $50 is optional. Just a gift! After all, it's almost Christmas! Developer and Co-OwnerInTime Applicaitons Inc. Share this post Link to post Share on other sites
thanh159 0 Posted December 19, 2010 (edited) #include <IE.au3> #include <File.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30) GUISetState() ;Show GUI _IENavigate ($oIE, "http://google.com") is it ?????? Edited December 19, 2010 by thanh159 Share this post Link to post Share on other sites
intime69 0 Posted December 19, 2010 is it ??????Thanks... but not quite. I know how to do the embedded IE object. On some websites, certain links will open a new tab or a new window. I want this new windows to be contained within the "Embedded IE Browser". In other words, I don't want these links to open a new IE window. Worst case, it should open a new "Embedded IE Browser" window and not IE itself. So it's the 'New Window Event' http://msdn.microsoft.com/en-us/library/aa768335.aspx that I am trying to capture. I hope that I have explained this correctly. It's kinda difficult to put into words... Developer and Co-OwnerInTime Applicaitons Inc. Share this post Link to post Share on other sites
DaleHohm 65 Posted December 19, 2010 You'll need to either modify the HTML in the initial window to change the target= attribute of the link before it is clicked on, or inject javascript into the page that traps the newwindow event (autoit ObjEvent cannot be used to modify the behaviour of an event, only to be notified of it). The solution will be unique to each page you are trying to control, so there is no "general" solution. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe 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 Share this post Link to post Share on other sites
Zohar 3 Posted December 19, 2010 can't he somehow activate IE's Popup Blocker feature, on an instance basis? If he looks in the documentation, maybe Mirosoft exposed it. (tho I am not sure it will be on an instance basis.. probably on a general one - affecting IE generally on that computer). Share this post Link to post Share on other sites
intime69 0 Posted December 19, 2010 (edited) You'll need to either modify the HTML in the initial window to change the target= attribute of the link before it is clicked on, or inject javascript into the page that traps the newwindow event (autoit ObjEvent cannot be used to modify the behaviour of an event, only to be notified of it). The solution will be unique to each page you are trying to control, so there is no "general" solution.DaleThanks Dale!I think I have a way to do this. It involves grabbing the IE address as a NewWindow is created and killing the IE process. This can be done instantly without showing the IE window but it uses 3 to 5% more CPU compared to using a delayed technique where the IE window pops up for about a second before the process is killed. In kiosk mode where the GUI is set to always active, killing the IE process is optional but after closing the GUI, a few IE windows might be open. So killing IE as it pops up is a better option but will prevent the user from using IE all to getter. And that is where Firefox or Opera might come in handy! lol If you have anymore ideas, please don't hesitate to let me know...Ian Edited December 19, 2010 by intime69 Developer and Co-OwnerInTime Applicaitons Inc. Share this post Link to post Share on other sites