Sign in to follow this  
Followers 0
Nova

Error when using IE.au3

11 posts in this topic

#1 ·  Posted (edited)

Hi guys,

Ive written a script using IE.au3, its actually my first script using these wonderfull UDF's so im alittle lost as to solve the error im getting. The script ive written simply logs into a webpage that has a log in prompt.

Heres the bones of my script.

#include <IE.au3>

$username = "username"
Spassword = "password"

$oIE = _IECreate()
_IENavigate($oIE, "http://mywebpage.com/")

; get pointers to the login form and username and password fields
$o_form = _IEFormGetObjByName($oIE, "login")
$o_login = _IEFormElementGetObjByName($o_form, "user")
$o_password = _IEFormElementGetObjByName($o_form, "password")

;Set field values and submit the form
_IEFormElementSetValue($o_login, $username)
_IEFormElementSetValue($o_password, $password)
_IEFormSubmit($o_form)

Exit

Heres the error im getting.

Line 709 (File "C:\Program Files\AutoIt3\beta\Include\IE.au3"):

Until ($oTemp.document.readyState = "complete" Or $oTemp.document.readyState = 4)

Untill ($oTemp.document.readyState ^ ERROR

Error: The requested action with this object has failed.

This error dosent occur everytime I run my script, it seems to only occur on random excutions. What is the cause of this error? and any suggestions on how I can go about fixing it?

Nova.

Edited by Nova

Share this post


Link to post
Share on other sites



Hi guys,

Ive written a script using IE.au3, its actually my first script using these wonderfull UDF's so im alittle lost as to solve the error im getting. The script ive written simply logs into a webpage that has a log in prompt.

Heres the bones of my script.

#include <IE.au3>

$username = "username"
Spassword = "password"

$oIE = _IECreate()
_IENavigate($oIE, "http://mywebpage.com/")

; get pointers to the login form and username and password fields
$o_form = _IEFormGetObjByName($oIE, "login")
$o_login = _IEFormElementGetObjByName($o_form, "user")
$o_password = _IEFormElementGetObjByName($o_form, "password")

;Set field values and submit the form
_IEFormElementSetValue($o_login, $username)
_IEFormElementSetValue($o_password, $password)
_IEFormSubmit($o_form)

Exit

Heres the error im getting.

This error dosent occur everytime I run my script, it seems to only occur on random excutions.

What is the cause of this error? and any suggestions on how I can go about fixing it?

get the new release from dale .... T2 ... its in scripts and scrapts

it fixes this problem

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

get the new release from dale .... T2 ... its in scripts and scrapts

it fixes this problem

8)

@Valuater I am using T2, im also using the latest beta.

Im still getting the error, any ideas?

Nova.

Edited by Nova

Share this post


Link to post
Share on other sites

Anybody got any ideas why this error keeps happening?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Anybody got any ideas why this error keeps happening?

Yes. I'll post T2.0-2 in a few minutes... I am expecting it to squash this problem once and for all. The _IEFormSubmit calles _IELoadWait for you and there is a small timing window there this error can occur. I've finally bit the bullet and implemented a scheme for COM error handling in IE.au3 that will make IE.au3 resilient to these sorts of transient issues.

Dale

P.S. Valuator is correct that most of the situations that could experience this error were addressed in previous versions of T2.0... T2.0-2 closes this last hole.

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

Share this post


Link to post
Share on other sites

I believe im already using T2.0-2, I downloaded it from the follwing link.

http://www.autoitscript.com/forum/index.ph...25629&hl=IE.au3

Is this the version your talking about? Or is there a newer version that I am unaware of ?

Nova.

T2.0-2 was not available until after your post. _IE_VersionInfo() can be used to verify.

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

Share this post


Link to post
Share on other sites

Thanks for your reply Dale, one last request, can you post a link to the newest release of IE.au3?

Is it the link I posted above?

Thanks, Nova.

Share this post


Link to post
Share on other sites

Ok ive downloaded what I believe is the newest version of IE.au3 version T2.0-2 from http://www.autoitscript.com/forum/index.ph...25629&hl=IE.au3 and now when I run the script I posted abov I get this error as soon as the script is run everytime.

Line 1168 (File "C:\Program Files\AutoIt3\beta\Include\IE.au3"):

If IsObj($o_col) Then $i_length = $o_col.length

If IsObj($o_col) Then $i_length = $o_col.length^ERROR

Error: The requested action with this object had failed.

Has the santax in the new version changed or something?

Share this post


Link to post
Share on other sites

Ok ive downloaded what I believe is the newest version of IE.au3 version T2.0-2 from http://www.autoitscript.com/forum/index.ph...25629&hl=IE.au3 and now when I run the script I posted abov I get this error as soon as the script is run everytime.

Has the santax in the new version changed or something?

It appears I've injected a problem into T2.0-2, but I cannot reproduce it.

Can you post a small snippet of code that will reproduce this problem?

thanks,

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

Share this post


Link to post
Share on other sites

Please test with new version T2.0-3 and report any problems.

Thanks,

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

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  
Followers 0