Darkbanner Posted June 7, 2012 Share Posted June 7, 2012 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 Link to comment Share on other sites More sharing options...
Kidney Posted June 7, 2012 Share Posted June 7, 2012 you should look into the Internet Explorer functions included in AuotIT. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 7, 2012 Share Posted June 7, 2012 If you are going to go the IE.au3 way, you would want to use _IEFormElementSetValue and _IEFormSubmit. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Darkbanner Posted June 7, 2012 Author Share Posted June 7, 2012 Hmm i don't understand the html stuff could someone make this for me? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 7, 2012 Share Posted June 7, 2012 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. Link to comment Share on other sites More sharing options...
Darkbanner Posted June 7, 2012 Author Share Posted June 7, 2012 Sorry i really don't understand! I pay 2$ paypal for someone make me this. Link to comment Share on other sites More sharing options...
Darkbanner Posted June 7, 2012 Author Share Posted June 7, 2012 #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 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 7, 2012 Share Posted June 7, 2012 Try_IEFormSubmit($oSub) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Darkbanner Posted June 7, 2012 Author Share Posted June 7, 2012 Don't work to bro Link to comment Share on other sites More sharing options...
Skitty Posted June 7, 2012 Share Posted June 7, 2012 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) Link to comment Share on other sites More sharing options...
Darkbanner Posted June 7, 2012 Author Share Posted June 7, 2012 There is only one problem, i can't find a WinHTTP.au3 download o.O Link to comment Share on other sites More sharing options...
Skitty Posted June 7, 2012 Share Posted June 7, 2012 There is only one problem, i can't find a WinHTTP.au3 download o.OIts thread is Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 7, 2012 Share Posted June 7, 2012 Try_IEFormSubmit($oForm) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Darkbanner Posted June 7, 2012 Author Share Posted June 7, 2012 <- the download is down._IEFormSubmit($oForm) <- don't work bro sry Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now