Jump to content

IE navigation


Zepx
 Share

Recommended Posts

The 1st code is the working version. The 2nd code is the changes that I've made from the first.

#include <GUIConstants.au3>
#include <IE.au3>
#include <Timers.au3>

$Form1 = GUICreate("Test Console", 633, 455, 193, 125)
$Edit1 = GUICtrlCreateEdit("", 8, 32, 273, 377)
GUICtrlSetColor($Edit1, 0xfcff00)
GUICtrlSetBkColor(-1, 0x005826)
GUICtrlSetData(-1, "Test Console")
$Button1 = GUICtrlCreateButton("Start", 360, 416, 123, 25, 0)
$Button2 = GUICtrlCreateButton("Stop", 496, 416, 123, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)

$oIE = _IECreateEmbedded()
;Global $oIE = ObjCreate("Shell.Explorer.2")
$GUIoIE = GUICtrlCreateObj($oIE, 288, 32, 329, 377)

$runme = _Timer_SetTimer($Form1, 1000, "RunME")

While 1
    If GUIGetMsg() = $GUI_EVENT_CLOSE THen Exit
WEnd

Func RunME($hwnd, $msg, $idtimer, $dwtimer)
    _Timer_KillTimer($Form1, $runme) ;I want the timer to run once
    $oIE.navigate("http://google.com")
EndFuncoÝ÷ Ø!jxu«­¢+ØÀÌØí½%¹¹Ù¥Ñ ÅÕ½Ðí¡ÑÑÀè¼½½½±¹½´ÅÕ½Ðì¤oÝ÷ Ù:ºÚ"µÍÒQS]YØ]J  ÌÍÛÒQK  ][ÝÚËÙÛÛÙÛKÛÛI][ÝÊ

By using _IENavigate instead of accessing the instance of the object, my GUI got stucked and unresponsive. It works fine with object.navigate.

Edited by Zepx
Link to comment
Share on other sites

Please make it easier to help you.

I don't have the time to study your code line by line and try to determine what is different between the examples - please point this out clearly.

Please provide fully functional examples - these are missing #includes and perhaps other things. I don't have the time to try to fix up your code to try to test it.

Please be clear on exactly what doesn't work for you, what you expected to happen and what you have done to try to solve the problem yourself.

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

Change

_IENavigate($oIE, "http://google.com")

to

_IENavigate($oIE, "http://google.com", 0)

to instruct it not to wait for the page load to complete ($oIE.navigate has no concept of the wait).

There is something odd however because this works:

_IENavigate($oIE, "http://google.com")

_IELoadWait($oIE)

which I expect to be the same as using wait in _IENavigate. I need to look at it in more detail.

Dale

Edited 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

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