Jump to content
Sign in to follow this  
6105

_IELoadWait not work with __IENavigate?

Recommended Posts

6105

When i try to wait loading of __IENavigate, that never wait :oops:

Reproducer:

#include <IE.au3>
$oIE = _IECreate ('autoitscript.com')
_IELoadWait($oIE)
For $i=0 To 10 Step +1
__IENavigate($oIE, 'autoitscript.com', 1, 0x800)
_IELoadWait($oIE)
Next
Sleep(5000)
_IEQuit($oIE)

Also i try to use $f_wait, 3th Parrameter of __IENavigate, but that also not work :bye:

__IENavigate($o_object, $s_Url, $f_wait, $i_flags)

Thanks for any tips


[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites
DaleHohm

That is precisely why __IENavigate is an undocumented function. When you use it to create a new window or tab, the handle of the new object is not given back to the caller.

After creating the new tab, you'll need to get it's object reference with _IEAttach, then you can use that with _IELoadWait()

Dale

  • Like 1

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  

  • Similar Content

    • ur
      By ur
      I have kept below line to wait for IE to load the site completely and continue.
      _IELoadWait($oIE)
       
      But, the code is continuing without waiting for it and I my execution is failing as the elements are not loaded completely.

       
      Any suggestions for alternate code to wait for the browser to load completely?
       
    • ileandros
      By ileandros
      Hello,

      I have this simple script which automates google translate.

      #include <IE.au3> $oIE = _IECreate("http://translate.google.com/#en|fr|") $oForm = _IEFormGetObjByName($oIE, "text_form") $oText = _IEFormElementGetObjByName($oForm, "text") _IEFormElementSetValue($oText, "Hello") Sleep(3000) $id = _IEGetObjById($oIE, "result_box") $oText1 = _IEPropertyGet($id, "innertext") MsgBox(0,"Translate",$oText1)
      What i want to do it to remove the Sleep(3000) that there is in the script. But removing it the script doesnt works because the message box appears before geting the value of the innertext....
      Is there a way to remove or replace the sleep time??? I tried _IELoadWait() but it doesnt work.
      Any tips??

      Edit: Testing for the $oText1.value just add some more pointless lines to the script and leeds at adding sleep seconds until value is true...
    • 6105
      By 6105
      Hi,

      Can't resolve a problem with killing needed attached tabs, always is killed 3 from 5.
      Here is 6 links, 5 need to be killed:


      #include <IE.au3> #include <String.au3> $oIE = _IECreate('facebook.com') __IENavigate($oIE, 'm.facebook.com', 0, 0x800) __IENavigate($oIE, 'm.facebook.com', 0, 0x800) __IENavigate($oIE, 'm.facebook.com', 0, 0x800) __IENavigate($oIE, 'm.facebook.com', 0, 0x800) __IENavigate($oIE, 'm.facebook.com', 0, 0x800) sleep(5000) Dim $aIE[1] Dim $aRE[1] $aIE[0] = 0 $aRE[0] = 0 $i = 1 While 1 $oIE = _IEAttach ("", "instance", $i) If @error = $_IEStatus_NoMatch Then ExitLoop ReDim $aIE[$i + 1] ReDim $aRE[$i + 1] $aIE[$i] = $oIE $get = _IEPropertyGet($oIE, "locationurl") $aRE[$i] = $get $aIE[0] = $i $check = _StringBetween($get, "m.", ".com") If not @error then $oIE = _IEAttach ("", "instance", $i) ConsoleWrite('Get = '&$get&@CRLF) _IEQuit($oIE) sleep(200) EndIf $i += 1 WEnd MsgBox(0, "Browsers Found", "Number of browser instances in the array: " & $aIE[0])

      Thank you in advance.
      Tedy.
×