Miguel Posted July 19, 2009 Posted July 19, 2009 (edited) Hello Everybody I Wonder if somenone could help me solving this problem. After some hours trying to understand what have i done wrong and after searching the forum i´ve gived up. This is my problem: I have a Gui with 2 child gui´s that intend to work like a tab. In one child i have a IE browser. After clicking Button1, when i click in any of the website links the Gui stops responding! This is a sample of code that reproduces the problem. expandcollapse popup#include <IE.au3> #include <EditConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $child1, $child2 Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### $Main = GUICreate("Main", 633, 447, -1, -1) $Button1 = GUICtrlCreateButton("Child 1", 49, 8, 50, 25, $WS_GROUP) GUICtrlSetOnEvent($Button1, "Button1Click") $Button2 = GUICtrlCreateButton("Child 2", 137, 8, 50, 25, $WS_GROUP) GUICtrlSetOnEvent($Button2, "Button2Click") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #Region ### START Koda GUI section ### $child2 = GUICreate("child2", 633, 417, 0, 30, $WS_CHILD, 0, $Main) $Edit1 = GUICtrlCreateEdit("", 32, 40, 185, 353) GUICtrlSetData($Edit1, "bla bla bla...") #EndRegion ### END Koda GUI section ### #Region ### START Koda GUI section ### $child1 = GUICreate("child1", 641, 451, 0, 0, $WS_CHILD, 0, $Main) $Obj1 = ObjCreate("Shell.Explorer.2") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 32, 64, 570, 356) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### _IENavigate($Obj1, "http://www.autoitscript.com") While 1 Sleep(100) WEnd Func Button1Click() GUISetState(@SW_SHOW,$child1) GUISetState(@SW_HIDE,$child2) EndFunc Func Button2Click() GUISetState(@SW_SHOW,$child2) GUISetState(@SW_HIDE,$child1) EndFunc Edited July 19, 2009 by Miguel
dantay9 Posted July 20, 2009 Posted July 20, 2009 All I can tell you is that it has something to do with the internet control. The cpu usage goes up to 100% on my pc. Try constructing an error handler for the shell.explorer.2 object. This might show what the error is.
trung0407 Posted July 20, 2009 Posted July 20, 2009 Well. Don't try to hide obj control, that fixed -.-
Miguel Posted July 20, 2009 Author Posted July 20, 2009 Well. Don't try to hide obj control, that fixed -.-What do you mean by not hiding the obj control?could you change my code and post it.
trung0407 Posted July 20, 2009 Posted July 20, 2009 (edited) There's probably a bug with object browser. If you try to hide that object, show it, and click it again, your script stop responding. Hiding a GUI that contains an object browser is the same... Best way is to using Tab Edited July 20, 2009 by trung0407
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