Bot Posted June 11, 2010 Share Posted June 11, 2010 (edited) Hello,I'm about creating an embedded IE into my GUI, write some contents to it and make a refresh. However, I can find a way to disable its load wait. Can anybody show me please. Thanksexpandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.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) GUISetState() _IENavigate ($oIE, "about:blank") $sHTML = "" $sHTML &= "<HTML>" & @CR $sHTML &= "<HEAD>" & @CR $sHTML &= "<TITLE>iFrame</TITLE>" & @CR $sHTML &= "</HEAD>" & @CR $sHTML &= "<BODY>" & @CR $sHTML &= "<IFRAME SRC='http://www.google.com'></IFRAME>" & @CR $sHTML &= "</BODY>" & @CR $sHTML &= "</HTML>" _IEDocWriteHTML($oIE, $sHTML) _IEAction($oIE, "refresh") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Exit Edited June 12, 2010 by Bot Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 11, 2010 Share Posted June 11, 2010 What load wait? There is no load, or load wait, when you create the embedded instance. There is an $f_wait flag you can set to 0 for _IENavigate() (see help file). Are you talking about the _IEAction() with "refresh"? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Bot Posted June 11, 2010 Author Share Posted June 11, 2010 (edited) What load wait? There is no load, or load wait, when you create the embedded instance. There is an $f_wait flag you can set to 0 for _IENavigate() (see help file).Are you talking about the _IEAction() with "refresh"?If that so, I think it should be the _IEAction function. Cause I see that my GUI is temporarily unable to click when the page is loading. So do you have any solution for this? Edited June 12, 2010 by Bot Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 11, 2010 Share Posted June 11, 2010 Sure enough, _IEAction() "refresh" does call _IELoadWait(), and there's no $f_wait flag: Func _IEAction(ByRef $o_object, $s_action) ; ... Case $s_action = "refresh" $o_object.document.execCommand("Refresh") _IELoadWait($o_object) Return SetError($_IEStatus_Success, 0, 1) ; ... EndFunc You can just extract the functional part and use this instead: $oIE.document.execCommand("Refresh") Another option is to just ControlSend() "{F5}" to it. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Bot Posted June 12, 2010 Author Share Posted June 12, 2010 I have replaced the _IEAction($oIE, "refresh")with$oIE.document.execCommand("Refresh")and things just work fine Thanks a lot for your help. 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