Jump to content
Sign in to follow this  

random error with _IEBodyReadText

Recommended Posts

Hey all,

I am getting an error from IEBodyReadText in IE.au3 and I can't reproduce it on demand. The code I wrote is simply reacting to user input on a Google form. The return is

SetError($_IEStatus_Success, 0, $o_object.document.body.innertext)

This code can run for hours or 5 minutes. Could I be failing grab and pass the object because of timing in a looop? Any help is greatly appreciated.

While $sOnMainPage = 1

$o_IE_MainPage = _IEAttach("PNHS Learning Commons Attendance", "WindowTitle")

;MsgBox(0, "Wait", $Wait)

If $o_IE_MainPage <> 0 Then

$sText = _IEBodyReadText($o_IE_MainPage)

;MsgBox(0, "$sText Looks like", $sText)

$sMissRequirment = StringInStr($sText, "Looks like you have a question or two that still needs to be filled out.")

;MsgBox(0, "$sMissRequirment", $sMissRequirment)

If $sMissRequirment = 306 Then

_IENavigate($o_IE_MainPage, "https://spreadsheets.google.com/viewform?formkey=dDFOR0NmcE", 1)

MsgBox(48, "Incomplete", "Missed a required field", 3)

$o_IE_MainPage = _IEAttach("PNHS Learning Commons Attendance", "WindowTitle")



$o_IE_MainPage = _IEAttach("PNHS Learning Commons Attendance", "WindowTitle")

;MsgBox(0,"Secon While MSGBOX",$o_IE_MainPage)

If $o_IE_MainPage = 0 Then

;MsgBox(0,"Main Page", $o_IE_MainPage)


$o_IE_UnknownPage = _IEAttach("", "Instance", 1)

;MsgBox(0,"In While Loop", "ElseIf")

;Need to make sure student hasn't clicked on Google Doc's, Report Abuse, Terms of Service or Additional Terms

;or that they have completed the form

Call("DeniedLink", $o_IE_UnknownPage)


$o_IE_MainPage = _IEAttach("PNHS Learning Commons Attendance", "WindowTitle")


Share this post

Link to post
Share on other sites

Try adding _IELoadWait($oIE) just before the failing call.


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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...