Sign in to follow this  
Followers 0
GideonM

Child press tab no focus _IECreateEmbedded

3 posts in this topic

#1 ·  Posted (edited)

Hallo all,

There is some problem with gui's and ieembedded (or my scripting skills).

If I press tab on a popup to switch to the next input, it loses focus.

But when I do not create the embedded IE it does work.

Am I doing something wrong or do I need to delete the IEembedded when a popup needs to pop up?

Maybe important to know:

Environment(Language:0413 Keyboard:00020409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64)

with IE10

Here is the script:

Not working

#include <IE.au3>
#include <WindowsConstants.au3>

$parent = GUICreate("Parent",1000,1000)
GUISetState()
$child = GUICreate("child",400,400,10,10,$WS_CHILD,-1,$parent)
$oIE = _IECreateEmbedded()
$openpop = GUICtrlCreateButton("Open Popup",10,10)
GUICtrlCreateObj($oIE,10,40,380,340)
GUICtrlSetResizing(-1,1);dock_auto
GUISetState()
_IENavigate($oIE,"http://www.google.nl")
While 1
$msg =GUIGetMsg()
Select
Case $msg = -3 ;gui_event_close
ExitLoop
Case $msg = $openpop
$pop = GUICreate("press tab",200,200,10,10,$WS_POPUP,-1,$parent) ;ws_child cannot be used (see help)
GUICtrlCreateInput("",10,10,100)
GUICtrlCreateInput("",10,40,100)
GUICtrlCreateInput("",10,70,100)
$close = GUICtrlCreateButton("exitloop",10,100,100)
GUISetState()
While 1
     $msgP = GUIGetMsg()
     Select
     Case $msgP = $close
     ExitLoop
     EndSelect
     WEnd
GUIDelete($pop)
EndSelect
WEnd
_IEQuit($oIE)
GUIDelete($child)
GUIDelete($parent)

Working but no IE:(

#include <IE.au3>
#include <WindowsConstants.au3>

$parent = GUICreate("Parent",1000,1000)
GUISetState()
$child = GUICreate("child",400,400,10,10,$WS_CHILD,-1,$parent)
;$oIE = _IECreateEmbedded()
$openpop = GUICtrlCreateButton("Open Popup",10,10)
;GUICtrlCreateObj($oIE,10,40,380,340)
GUICtrlSetResizing(-1,1);dock_auto
GUISetState()
;_IENavigate($oIE,"http://www.google.nl")
While 1
$msg =GUIGetMsg()
Select
Case $msg = -3 ;gui_event_close
ExitLoop
Case $msg = $openpop
$pop = GUICreate("press tab",200,200,10,10,$WS_POPUP,-1,$parent) ;ws_child cannot be used (see help)
GUICtrlCreateInput("",10,10,100)
GUICtrlCreateInput("",10,40,100)
GUICtrlCreateInput("",10,70,100)
$close = GUICtrlCreateButton("exitloop",10,100,100)
GUISetState()
While 1
     $msgP = GUIGetMsg()
     Select
     Case $msgP = $close
     ExitLoop
     EndSelect
     WEnd
GUIDelete($pop)
EndSelect
WEnd
;_IEQuit($oIE)
GUIDelete($child)
GUIDelete($parent)
Edited by GideonM

Share this post


Link to post
Share on other sites



This is working to, but I would like to display the ie object and the popup at the same time.

By the way, this script is an example of the problem, the real script is much more text, it does not make sense.

I'm only curious why this is happening.

And for maybe in the future people can find this as a solution:

#include <IE.au3>
#include <WindowsConstants.au3>

$parent = GUICreate("Parent",1000,1000)
GUISetState()
$child = GUICreate("child",400,400,10,10,$WS_CHILD,-1,$parent)
$oIE = _IECreateEmbedded()
$openpop = GUICtrlCreateButton("Open Popup",10,10)
$ieobj = GUICtrlCreateObj($oIE,10,40,380,340)
GUICtrlSetResizing(-1,1);dock_auto
GUISetState()
_IENavigate($oIE,"http://www.google.nl")
While 1
$msg =GUIGetMsg()
Select
  Case $msg = -3 ;gui_event_close
   ExitLoop
  Case $msg = $openpop
   GUISwitch($child)
   $oIE = 0
   GUICtrlDelete($ieobj)
   $pop = GUICreate("press tab",200,200,10,10,$WS_POPUP,-1,$parent) ;ws_child cannot be used (see help)
   GUICtrlCreateInput("",10,10,100)
   GUICtrlCreateInput("",10,40,100)
   GUICtrlCreateInput("",10,70,100)
   $close = GUICtrlCreateButton("exitloop",10,100,100)
   GUISetState()
    While 1
     $msgP = GUIGetMsg()
      Select
       Case $msgP = $close
        ExitLoop
      EndSelect
     WEnd
   GUIDelete($pop)
   $oIE = _IECreateEmbedded()
   GUISwitch($child)
   GUICtrlCreateObj($oIE,10,40,380,340)
   GUICtrlSetResizing(-1,1);dock_auto
   _IENavigate($oIE,"http://www.google.nl")
EndSelect
WEnd
_IEQuit($oIE)
GUIDelete($child)
GUIDelete($parent)

Share this post


Link to post
Share on other sites

There have long been issues with the GUI embedded webbrowser control. Since you have created a reproducer, I'd suggest that enter a Trac bug report. Pragmatically, look at my sig for alternatives to _IECreateEmbedded that work very differently, but may give you what you need.

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0