user52 Posted November 26, 2006 Share Posted November 26, 2006 I've trimmed down the code, but I'm using multiple embedded ie windows. I noticed that when tabbing in the first embedded (google.com) the 2nd embedded window (yahoo.com) gets focus and tabs.How can I keep the focus in the first window when tabbing?I've found thesehttp://www.autoitscript.com/forum/index.php?showtopic=31539http://www.autoitscript.com/forum/index.php?showtopic=32804http://www.autoitscript.com/forum/index.php?showtopic=35742Is $WS_TABSTOP what I want? Point me in the right directionThanks#include <GuiConstants.au3> #include <IE.au3> HotKeySet("{ESC}", "_Exit") $gui = GuiCreate("", 510, 620) $google_oIE = _IECreateEmbedded() $google_ie = GUICtrlCreateObj($google_oIE, 5, 5, 500, 300) _IENavigate ($google_oIE, "http://www.google.com/", 0) $yahoo_oIE = _IECreateEmbedded() $yahoo_ie = GUICtrlCreateObj($yahoo_oIE, 5, 310, 500, 300) _IENavigate ($yahoo_oIE, "http://www.yahoo.com", 0) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _Exit() Exit EndFunc Link to comment Share on other sites More sharing options...
DaleHohm Posted November 26, 2006 Share Posted November 26, 2006 (edited) lod3n did quite a lot of research (first two links you provided) on this and found a workaround that got him going. Unfortunately for you, his work did not conclude with a bug report for AutoIt, because it will take some in depth analysis from both AutoiIt GUI and COM devs to understand and make any changes to this behavior. After the work that lod3n did I was never clear whether this was an issue somehow specific to IE or whether it related to a class of embedded objects -- if you can figure this out it would strengthen a bug report substantially. Sorry I don't have anything else to offer at this point. Perhaps you can get lod3n to comment and then work on preparing a bug report. Dale Edit: typos Edited November 26, 2006 by DaleHohm 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 More sharing options...
heibel Posted November 26, 2006 Share Posted November 26, 2006 Hi, just thinking loud... Get them handles and them some logic to 'always focus on one of the windowhandles"... Okay, just thinking loud... $CGH=ControlGetHandle("Google","","Internet Explorer_Server1"); ? might be: Google Internet Explorer ??? $oIEhhandleGoogle=__IEControlGetObjFromHWND($CGH) and also: $CGH=ControlGetHandle("Yahoo!","","Internet Explorer_Server1"); ? $oIEhhandleYahoo=__IEControlGetObjFromHWND($CGH) While blabla focus/activate whatever WEnd Hope this helps (let us know...) Link to comment Share on other sites More sharing options...
user52 Posted November 27, 2006 Author Share Posted November 27, 2006 thanks for the help no luck yet i tried creating and then deleting the $yahoo_ie using GUICtrlDelete($yahoo_ie) i tried $cgh = ControlGetHandle("","",$google_oIE) ControlSend($cgh, "", "Internet Explorer_Server1", "hey") ;this line worked Sleep(1000) ControlSend($cgh, "", "Internet Explorer_Server1", "{TAB}") Sleep(1000) ControlSend($cgh, "", "Internet Explorer_Server1", "+{TAB}") Sleep(1000) ControlSend($cgh, "", "Internet Explorer_Server1", "^{TAB}") Sleep(1000) ControlSend($cgh, "", "Internet Explorer_Server1", "^+{TAB}") Sleep(1000) ControlSend($cgh, "", "Internet Explorer_Server1", "{TAB 30}") can you delete the object that was created using GUICtrlCreateObj? . Link to comment Share on other sites More sharing options...
DaleHohm Posted November 27, 2006 Share Posted November 27, 2006 can you delete the object that was created using GUICtrlCreateObj?Set the object variable to null string or 0. 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 More sharing options...
user52 Posted November 27, 2006 Author Share Posted November 27, 2006 (edited) Set the object variable to null string or 0. DaleNot sure but $google_oIE = "" $google_ie = ""didn't work thanks tho Edited November 27, 2006 by user52 Link to comment Share on other sites More sharing options...
user52 Posted November 27, 2006 Author Share Posted November 27, 2006 For some reason this code keeps the focus in the first embedded window#include <GuiConstants.au3> #include <IE.au3> $gui = GuiCreate(" ", 800, 600) $oIE = _IECreateEmbedded () $ie = GUICtrlCreateObj($oIE, 0, 0, 800, 300) GUICtrlCreateTreeView(0, 0) $oIE2 = _IECreateEmbedded () $ie2 = GUICtrlCreateObj($oIE2, 0, 300, 800, 300) GuiSetState() _IENavigate($oIE,"http://www.google.com") _IENavigate($oIE2,"http://www.yahoo.com") While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEndany thoughts?. Link to comment Share on other sites More sharing options...
user52 Posted November 27, 2006 Author Share Posted November 27, 2006 perhaps when tab is pressed you can... get all the controls on the page, get the currently focused control, and _IEAction($focused_control + 1, "focus") to focus on the next control on the page or something Link to comment Share on other sites More sharing options...
user52 Posted December 2, 2006 Author Share Posted December 2, 2006 does this page help?? http://msdn.microsoft.com/workshop/author/...ing_activex.asp specifically... Method - Description IAccessible::accDoDefaultAction - Activates the control and will expose the ActiveX control or Java Applet within the MSAA tree. IAccessible::accHitTest - Returns CHILDID_SELF IAccessible::accLocation - Location of the underlying ActiveX control or Java Applet IAccessible::accNavigate - Returns E_NOTIMPL IAccessible::accSelect - Returns E_NOTIMPL IAccessible::get_accChild - Returns S_FALSE IAccessible::get_accChildCount - Returns 0 and S_OK IAccessible::get_accDefaultAction - Returns "Select this control" IAccessible::get_accDescription - Returns E_NOTIMPL IAccessible::get_accFocus - Returns E_NOTIMPL IAccessible::get_accHelp - Returns "This control is inactive. Select the control to activate and use it." IAccessible::get_accHelpTopic - No Change - Returns E_NOTIMPL IAccessible::get_accKeyboardShortcut - No Change - Delegates the object. If there is no object, the method returns E_NOTIMPL. IAccessible::get_accName - Returns "Inactive Control" IAccessible::get_accParent - No Change - Returns the closest accessible element in the parent chain. IAccessible::get_accRole - Returns ROLE_SYSTEM_PUSHBUTTON IAccessible::get_accSelection - Returns E_NOTIMPL IAccessible::get_accState - Returns current state of the object. This state always includes STATE_SYSTEM_FOCUSABLE IAccessible::get_accValue - Returns E_NOTIMPL IAccessible::put_accName - Returns E_NOTIMPL IAccessible::put_accValue - Returns E_NOTIMPL all help is appreciated, thanks Link to comment Share on other sites More sharing options...
DaleHohm Posted December 2, 2006 Share Posted December 2, 2006 I looked at the link. Don't believe it is related. I suggest you prepare a small reproducer and a problem description and place it in Bug Reports. This issue needs COM and GUI devs to analyze. 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 More sharing options...
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