Jump to content

winhttp login form help

Recommended Posts

I am trying to write an app to auto login to a website and then send commands to it.

The website is an internal to an ip controlled relay box (allows switching devices on/off via website)

i have done it with a gui that calls an ie session however this is ugle and would like to do it outside of ie.

here is the html of the login screen

<title>IP Family</title>

<p align="left"><font color="#0033ff" size="5" face="Verdana, Arial, Helvetica, sans-serif"><em><strong><font size="4">Aviosys
<p align="left"><font size="+1" face="Georgia,Arial"><font color="#0000ff" size="+2" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#000000" size="4" face="Arial"><b>Welcom to IP Family
<table border="0" width="392" bgColor="#dfdfdf" align="left">
<td noWrap="">
<form method="post" name="login" action="/tgi/login.tgi">
<table cellSpacing="0" cellPadding="10" width="96%" align="center" NAME="myTable">
<tbody><tr vAlign="top" align="left">
<td colSpan="2"><font size="2" face="Arial, Helvetica, sans-serif">Please enter User name &amp;
Password. (maximum = 8)</font></td></tr>
<tr vAlign="top" align="left">
<td><font face="Verdana,Arial"><font size="-1">User
<td><input name="Username" maxLength="32" value="admin" size="32" type="text"></td></tr>
<tr vAlign="top" align="left">
<td height="46"><font face="Verdana,Arial"><font size="-1">Password</font></font></td>
<td height="46"><input name="Password" maxLength="32" value="" size="32" type="password"></td></tr>
<tr vAlign="top" align="left">
<p align="center"><input onclick="calcResponse(); return false;" name="Submitbtn" value="&#9;  OK&#9;  " type="Submit">
       <input onclick="document.login.Username.value='';document.login.Password.value=''" name="Cancel" value="   Cancel   " type="button">
<input name="Challenge" value="k7n....." type="hidden"> <input name="Response" value="" type="hidden">
<p align="right"><a href="http://www.aviosys.com" target="_blank">www.aviosys.com</a></p></td></tr></tbody></table>

and here is the code i have so far


this results in a failed login screen, which i think is due to the shallange field but am unsure where to go from here?

Any advise would be great.


Edited by Melba23
Code removed
Link to post
Share on other sites

I am trying to write an app to auto login to a website

Please make sure to read the forum rules. Especially the part about login automation: SPAM tools including instant messenger or forum auto-posters. This includes forum or site auto-login methods.

My UDFs and Tutorials:


Active Directory (NEW 2021-11-10 - Version - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-11-16 - Version - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version - Download
Outlook Tools (2019-07-22 - Version - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

ADO - Wiki
WebDriver - Wiki


Link to post
Share on other sites
  • Moderators


Please read and follow the Forum rules to which water linked. ;)


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...