Sign in to follow this  
Followers 0
theguy0000

IE form not submiting...

5 posts in this topic

CODE
#include <IE.au3>

#region ask
$user = InputBox ("AutoPost", "Username")
$pass = InputBox ("AutoPost", "Password")


#endregion

$oIe = _IECreate ("http://www.autoitscript.com/forum/index.php")

#region login
_IELinkClickByText ($oIe, "Log In")
$oLogin = _IEFormGetObjByName ($oIe, "LOGIN")
$oUser = _IEFormElementGetObjByName ($oLogin, "UserName")
$oPass = _IEFormElementGetObjByName ($oLogin, "password")
_IEFormElementSetValue ($oUser, $user)
_IEFormElementSetValue ($oPass, $pass)
_IEFormElementCheckBoxSelect ($oLogin, 0, "", 0, "byIndex")
Sleep(1000)
_IEFormSubmit ($oLogin)
MsgBox (0, "", @error)
#endregion

It sets all the values fine, but it just doesn't submit...@error is returning 0

it just fills in all the elements, then exits, leaving the IE window open but not doing anything...


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites



Get the button by name or collection , then do an _IEAction($oObject,"click")

Share this post


Link to post
Share on other sites

It sets all the values fine, but it just doesn't submit...@error is returning 0

it just fills in all the elements, then exits, leaving the IE window open but not doing anything...

I ran into an issue with the Dell support website where the submit button was some kind of java jumbo and I had to press the button using the old-fashioned "mouseclick" method. Every time IE changes or the webpage changes I have to recalculate the location of the button. PITA, but it works!

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

Hey guys... listen to t-great and read the helpfile. Find this Remark in the section on _IEFormSubmit:

Remarks

For many HTML forms it is not sufficient to use _IEFormSubmit() because there is often custom Javascript tied to an onclick event for its Submit button. In these cases you'll need to simulate a click of the submit button instead of using _IEFormSubmit(). See the example for the "click" action of _IEAction().

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

Hey guys... listen to t-great and read the helpfile. Find this Remark in the section on _IEFormSubmit:

Dale

I saw that, but I checked and there is no obvious javascript event tied to the button. I'll get test the click one now, but just for knowledge's sake I'd like to find out why it's not working.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

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