Sign in to follow this  
Followers 0
J_Y_C

_IEFormSubmit

4 posts in this topic

I am working on a script that goes to google video, logs in, and then clicks some links from there. But, on the first form I deal with, after I submit the form with _IEformsubmit, the script stops running, and seems to lock up the engine. That is to say, even after the page is 100% done loading after submitting the login form, it never advances to the next step. In fact, as I have it now, the autoit engine just sits in the tray. Here's what I have so far:

#include <IE.au3>

$o_IE = _IECreate()
_IENavigate($o_IE, "https://www.google.com/accounts/Login?skipvpage=true&sendvemail=false&continue=http%3A%2F%2Fvideo.google.com%2F&hl=en")

; get pointers to the login form and username and password fields
$o_form = _IEFormGetObjByName($o_IE, "gaia_loginform")
$o_login = _IEFormElementGetObjByName($o_form, "Email")
$o_password = _IEFormElementGetObjByName($o_form, "Passwd")

; Set field values and submit the form
_IEFormElementSetValue($o_login, "xxxx@xxxxx.com")
_IEFormElementSetValue($o_password, "xxxxxxx")
Sleep(2000)
_IEFormSubmit($o_form,1)

Exit

So, it never exits. After submitting the form, it just freezes operation. No matter what commands I put after the IEFormSubmiit, it never does them.

Any help?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Thanks for reporting this. For now you'll need to change your submit command to this:

_IEFormSubmit($o_form, 0)

Behind the scenes, this COM error is being generated:

--> COM Error Encountered in tmp-asdfiiwl.au3
----> $IEComErrorScriptline = 618
----> $IEComErrorNumberHex = 80020009
----> $IEComErrorNumber = -2147352567
----> $IEComErrorWinDescription = Access is denied.
----> $IEComErrorDescription = Access is denied.
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = C:\WINDOWS\system32\mshtml.hlp
----> $IEComErrorHelpContext = 0
----> $IEComErrorLastDllError = 0

This is similar to a cross-site scripting security error and unfortunately is on Google sites using Ajax. The difference with this one of that the $IEComErrorNumber I have seen associated with "Access Is Denied" in the past was 169, not this one.

I'll change the code to trap for this as well, but your result will be the same -- IE.au3 will not be able to wait for the load to complete and you'll have to do your own check to insure it is done.

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

Share this post


Link to post
Share on other sites

Awesome, thank you sir. Like I could ever get service like that at M$!

So, would _IELoadWait work to wait for the page to load?

Share this post


Link to post
Share on other sites

So, would _IELoadWait work to wait for the page to load?

The trouble is that it cannot do it starting with the form object... this in fact will work:

_IEFormSubmit($o_form,0)
_IELoadWait($o_IE)

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