Jump to content

very urgent questi on about form submission!


Recommended Posts

I made the following code to automatically submit things on the website.

#include <IE.au3>
    
$sUpUser = "john doe2"
$sUpTitle = "autoooo2"
$sUpUrl = "http://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe"
$up_IE = _IECreate ("http://65.39.182.210/~hv7668/downloader/downloader.php", 0, 1)
$up_Form = _IEFormGetObjByName ($up_IE, "form")
$up_Query1 = _IEFormElementGetObjByName ($up_Form, "id")
$up_Query2 = _IEFormElementGetObjByName ($up_Form, "title")
$up_Query3 = _IEFormElementGetObjByName ($up_Form, "url")
_IEFormElementSetValue ($up_Query1, $sUpUser)
_IEFormElementSetValue ($up_Query2, $sUpTitle)
_IEFormElementSetValue ($up_Query3, $sUpUrl)
$tmp = _IEFormSubmit ($up_Form, 0)
_IELoadWait($up_IE, 3000)
MsgBox(0, "", "Uploaded "& $tmp);

Weird thing is that when i run this, three parameters are automatically filled in to the input boxes but the submit button is not pressed.

From the example, it should do the submission as well..but I don't know why it doesn't submit.

Can anyone please help me? Thank you

Link to comment
Share on other sites

Please read the remarks for _IEFormSubmit in the helpfile and try the workaround using _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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...