Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Winhttp filling out multi-page form

$
0
0

Hi all, question to those who are familiar with Winhttp, in particular _WinHttpSimpleFormFill()

 

I have a form that I fill out and submit using _WinHttpSimpleFormFill() which then returns a subsequent form based on the first form.

 

How do I then fill out the subsequent form?

#include "WinHTTP.au3" $sFile = @ScriptDir & "\test.csv" $sFileHTM = @ScriptDir & "\Form.htm" $hSession = _WinHttpOpen('Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0'); create new session $hConnect = _WinHttpConnect($hSession, "www.server.com") ; connect to server $sHTM = _WinHttpSimpleFormFill($hConnect, "form.cfm", "name:CFForm_2", "name:FileContents", $sFile, "name:import_vendor", "Generic") ;HERE I NEED TO FILL OUT THE SECOND FORM THAT IS RETURNED IN $sHTM If $sHTM Then     MsgBox(64 + 262144, "Done!", "Will open returned page in your default browser now." & @CRLF & _             "It should show array of uploaded files below the form.")     $hFileHTM = FileOpen($sFileHTM, 2)     FileWrite($hFileHTM, $sHTM)     FileClose($hFileHTM)     ShellExecuteWait($sFileHTM) EndIf

Cheers!


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>