Sign in to follow this  
Followers 0
Darkbanner

Need help with WinHttp

14 posts in this topic

Hi have a page with this content:

<html>
<body>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

I want auto it to fill in the filepath with the var $file and then submit the form.

How to do?

Regards Darkbanner

Share this post


Link to post
Share on other sites



you should look into the Internet Explorer functions included in AuotIT.

Share this post


Link to post
Share on other sites

Hmm i don't understand the html stuff could someone make this for me?

Share this post


Link to post
Share on other sites

There's functional example code in the Help file that may help you understand how it works. Asking for someone to write the code for you will almost certainly get you nothing but negative replies.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Sorry i really don't understand! I pay 2$ paypal for someone make me this.

Share this post


Link to post
Share on other sites

#include <IE.au3>
Local $oIE = _IECreate("http://razorhosting.de/imgspy/")
Local $oForm = _IEFormGetObjByName($oIE, "form")
Local $oText = _IEFormElementGetObjByName($oForm, "file")
Local $oSub = _IEFormGetObjByName($oIE, "submit")
_IEFormElementSetValue($oText, "Hey! This works!")
Sleep(100)
_IEFormSubmit($oForm)

This inserts the "hey! this works!" text but the submit don't work

Share this post


Link to post
Share on other sites

Try

_IEFormSubmit($oSub)


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Don't work to bro

Share this post


Link to post
Share on other sites

This is very easy, I recommend that you sit down and read the winhttp.au3 instruction manual, more specifically, read about "_WinHttpSimpleFormFill".

#include "WinHttp.au3"
Global $hOpen, $hConnect, $sRead

$hOpen = _WinHttpOpen()
$hConnect = _WinHttpConnect($hOpen, "domain.com")
$sRead = _WinHttpSimpleFormFill($hConnect, "test.php", "index:0", "name:file", $FileLocation)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

There is only one problem, i can't find a WinHTTP.au3 download o.O

Share this post


Link to post
Share on other sites

There is only one problem, i can't find a WinHTTP.au3 download o.O

Its thread is


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

Try

_IEFormSubmit($oForm)


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

<- the download is down.

_IEFormSubmit($oForm) <- don't work bro sry

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