Jump to content
Sign in to follow this  

How downloading file from web with form post method

Recommended Posts

Hi, all. I'am begginer in AutoIt. I need help with script how downloading any txt file from a web with form POST method. I know how to downloading any file with inetget (direct link), but I'am lost with this method downloading. Please, can anyone expert AutoIt help me with this problem? Target file must be downloaded to tmp folder without open a broser window (in the background). Thanks for any little example. Sorry for my bad English.

Example HTML(php) with desired file:

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

<form method="POST" action="generating.php">
    <input type="radio" name="r1" id="r1rtf" value="rtf" checked><label for="r1rtf">Formated file</label>
    <input type="radio" name="r1" id="r1txt" value="txt"><label for="r1txt">Plain text file</label>
    <input type="radio" name="r1" id="r1pak" value="pak"><label for="r1pak">PAK file</label>
    <input type="text" name="k2,08,08,17" value="def_name">
    <input type="submit" name="k2,08,08,17" value="Create">

Share this post

Link to post
Share on other sites

to Kurt: Yes, of course! But this did not working, because i have'n direct URL to file!!! I wrote, that file is possible downloading after submit button as form POST method (file is generated from SQL database records ... i supposing).

Edited by ancp

Share this post

Link to post
Share on other sites

If you need to manipulate forms etc, see IE.au3 (IE Management section under UDFs in the helpfile).


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...