Jump to content

Disable load wait of _IEAction "refresh"?


Bot
 Share

Recommended Posts

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. Thanks

#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 by Bot
Link to comment
Share on other sites

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"?

:mellow:

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

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"?

:mellow:

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 by Bot
Link to comment
Share on other sites

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.

:mellow:

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...