Sigmate Posted August 18, 2009 Posted August 18, 2009 Hi, I'm having a weird experience when using more than one instance of an IE (actually Shell.Explorer.2, through IE.au3 functions) COM object. I'd need to have at least two embedded IE controls into a single GUI (but for testing purpose, I also tried to put each instance into a separate window). The code below simply opens two GUI windows with a unique IE control inside each one. To reproduce what seems to be a bug, I invite you to try to do a copy/paste operation using your keyboard into the Google search fields opened in the IE controls. You'll rapidly observe that the first IE instace receive ALL copy/paste events, which makes it impossible to copy/paste something from one control to another one (which is my primary need for my application, actually). Despite many hours spent searching solutions and explainations about this strange behavior, I failed to find anything. Does anybody have any clue ? Thanks in advance ! expandcollapse popup#include <GUIConstantsEx.au3> #include <IE.au3> ;------------------------------------------------------------------------ $mainwindow = GUICreate("Win1", 640, 480) _IEErrorHandlerRegister () $EmbeddedIEObject1 = _IECreateEmbedded () $GUIActiveXCtrl1 = GUICtrlCreateObj($EmbeddedIEObject1, 10, 10, 620, 460) GUICtrlSetResizing($GUIActiveXCtrl1, $GUI_DOCKAUTO) _IENavigate ($EmbeddedIEObject1, "http://www.google.com/") ;------------------------------------------------------------------------ $secondarywindow = GUICreate("Win2", 640, 480) $EmbeddedIEObject2 = _IECreateEmbedded () $GUIActiveXCtrl2 = GUICtrlCreateObj($EmbeddedIEObject2, 10, 10, 620, 460) GUICtrlSetResizing($GUIActiveXCtrl2, $GUI_DOCKAUTO) _IENavigate ($EmbeddedIEObject2, "http://www.google.com/") ;------------------------------------------------------------------------ GUISwitch($mainwindow) GUISetState(@SW_SHOW) GUISwitch($secondarywindow) GUISetState(@SW_SHOW) ;------------------------------------------------------------------------ While 1 $msg = GUIGetMsg(1) Select Case $msg[0] = $GUI_EVENT_CLOSE Exit EndSelect WEnd
DaleHohm Posted August 18, 2009 Posted August 18, 2009 Untortunately it is an open bug: http://www.autoitscript.com/trac/autoit/ticket/110Dale 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now