
NTBM
Active Members-
Posts
29 -
Joined
-
Last visited
NTBM's Achievements

Seeker (1/7)
0
Reputation
-
Thankyou for your response. i had searched and found lots of pages but not that one, thankyou. if it helps, the important part is Data3 = {a hidden field value that is random with each page load} so i assume that the web enabled device is parsing the three variables to the script before submitting them. Form Data from web device <form NAME="Form1" ACTION="/tgi/page1.tgi" METHOD="post"> <center> <table NAME="myTable" ALIGN="center" CELLPADDING="10" WIDTH="96%" CELLSPACING="0"> <tr ALIGN="left" VALIGN="top"> <td COLSPAN="2"><font SIZE="2" FACE= "Arial, Helvetica, sans-serif">Please enter Data1 & Data2.</font></td></tr> <tr ALIGN="left" VALIGN="top"> <td><font FACE="Verdana,Arial"><font SIZE="-1">Data1</font></font></td> <td><input TYPE="text" NAME="Data1" VALUE="" SIZE="32" MAXLENGTH="32"></td></tr> <tr ALIGN="left" VALIGN="top"> <td HEIGHT="46"><font FACE="Verdana,Arial"><font SIZE= "-1">Data2</font></font></td> <td HEIGHT="46"><input TYPE="text" NAME="Data2" VALUE="" SIZE="32" MAXLENGTH="32"></td></tr> <tr ALIGN="left" VALIGN="top"> <td></td> <td> <p ALIGN="center"><input ONCLICK="calcResponse(); return false;" TYPE="Submit" NAME="Submitbtn" VALUE=" OK "> <input TYPE="button" NAME="Cancel" VALUE=" Cancel " ONCLICK= "data1.value='';data1.value=''"> </p></td></tr></table></center> <input TYPE="hidden" NAME="Challenge" VALUE= "hS0r...."> <input TYPE="hidden" NAME="Response" VALUE=""> </form> The Value of <input TYPE="hidden" NAME="Challenge"..> is random and but i can get it using winhttp Having next to no working knowledge of java script or MD5, what i am trying to figure out is if simply adding them all together and then creating an MD5 hex hash will give an answer that the web page will accept, or do i need (if possible) to parse it to the java script of the page?
-
I have a site that requires a valid md5 checksum to be given back to it in a form post, I am trying to utilize winhttp to pass the form data but need assistance with the md5 checksum. The page source code:- <script LANGUAGE="javascript" SRC="/md5.js" TYPE="text/javascript"> </script> <script LANGUAGE="javascript" TYPE="text/javascript"> function calcResponse() { str = Data1.value + Data2.value + Data3.value; Response.value = hex_md5(str); document.data.submit(); } </script> Is there a way that I can generate the required md5 to pass back in a _WinHttpSimpleFormFill command? Regards
-
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> <center> <p align="left"><font color="#0033ff" size="5" face="Verdana, Arial, Helvetica, sans-serif"><em><strong><font size="4">Aviosys Inc.</font></strong></em></font></p> <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 WebControl</b></font></strong></font></font></p> <table border="0" width="392" bgColor="#dfdfdf" align="left"> <tbody><tr> <td noWrap=""> <form method="post" name="login" action="/tgi/login.tgi"> <center> <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 & Password. (maximum = 8)</font></td></tr> <tr vAlign="top" align="left"> <td><font face="Verdana,Arial"><font size="-1">User Name</font></font></td> <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"> <td></td> <td> <p align="center"><input onclick="calcResponse(); return false;" name="Submitbtn" value="	 OK	 " type="Submit"> <input onclick="document.login.Username.value='';document.login.Password.value=''" name="Cancel" value=" Cancel " type="button"> </p></td></tr></tbody></table></center> <input name="Challenge" value="k7n....." type="hidden"> <input name="Response" value="" type="hidden"> </form></td></tr> <tr> <td> <p align="right"><a href="http://www.aviosys.com" target="_blank">www.aviosys.com</a></p></td></tr></tbody></table> </center> and here is the code i have so far <snip> 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. Cheers
-
Yeah thats what i thought. never used it either, about to post a question on it..... ahhhhh my head hurts
-
sorry Admiral, your post wasnt there when i started to type my reetraction due to my brain freeze. no the user needs to enter in an IP (if changed from default) the script then controls a web interface to a ip relay device to switch lights on and off. but maybe you can give me some idea of an alternative. currently i am controlling it via ie as per $oIE = ObjCreate("Shell.Explorer.2") ;Turn 4 on, and 3 off $oIE.navigate("http://" & GUICtrlRead($I_IP) & "/SetIO?p64=1+p63=0") $xCounter = 0 Do $xCounter = $xCounter + 1 if $xCounter = 11 then $oIE.navigate("http://" & GUICtrlRead($I_IP) & "/SetIO?p64=0+p63=0") MsgBox(0,"Error","Red xCounter=" & $xCounter & @CR & "http://" & GUICtrlRead($I_IP) & "/SetIO?p64=1+p63=0") Exit EndIf $body = _IETagNameGetCollection($oIE, "body", 0) $Check = StringInStr($body.innerText, "64=1") if $Check > 0 Then $Check = StringInStr($body.innerText, "63=0") EndIf Sleep(200) Until $Check > 0 as you can see this passes a username and password to the page (dont care about security). Then it looks at the page for the reponse. IE by default now days does not allow passing of user I would like to do this without relying on IE. Any idea's?
-
My bad feeling a little foolish. Just realized that i wasnt reading the value, was mearly displying the context.id Msgbox should have been msgbox(0, "IP", GUICtrlRead($I_IP)) sorry for wasting your time
-
This seems so simple but i cannot find an answer in either the forum or help file. i am creating a Gui that has an input box which displays a default IP address, however when i reference the variable i get returned a different value. see $Label6 = GUICtrlCreateLabel("IP Address", 34, 160, 55, 17) $I_IP = GUICtrlCreateInput("10.0.0.2", 96, 160, 121, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### MsgBox(0,"IP", String($I_IP)) Obviously there are more gui lines above this but what i have put above has no missing lines (so that you can see that the variable is not getting re-valued anywhere). When i run this the msgbox says the value is "16" What am i missing ? Cheers guys.
-
i am trying to get the current date and time of a selected email. This will be used later for saving it out to a .msg file. i have the script below that will list all the receivedtime for messages in the inbox, but what i am trying to achieve is to switch to outlook (dont care what folder the user is in) and get the timestamp for the item that is selected on their screen. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",1) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) #include <date.au3> #include <IE.au3> WinWait("Outlook","") If Not WinActive("Outlook","") Then WinActivate("Outlook","") WinWaitActive("Outlook","") Global $olFolderInbox = 6, $sSender = "anyone@anywhere.net.au", $sSubjectSTOP = "sSENTRY STOP", $sSubjectSTART = "sSENTRY START", _ $sSTime, $sSFlag, $receive $o_Outlook = ObjCreate("Outlook.Application") $oNameSpace = $o_Outlook.GetNameSpace("MAPI") $oInbox = $oNameSpace.GetDefaultFolder($olFolderInbox) $oItems = $oInbox.Items For $oItem In $oItems $receive = $oItem.ReceivedTime MsgBox(0,'',"The Date is:" & $receive) Next
-
i just found this http://www.autoitscript.com/forum/index.php?showtopic=42455&st=0&p=315776&hl=keysequence&fromsearch=1&#entry315776 which does come close however it appears that the script terminates after the first occurance of the sequence and i cant see why. also this may be difficult to adapt as i have many key sequences that i want to trigger.
-
I used to use a program called automate (unisys) to perform most of my auto functions, then i discovered autoit. i still use automate only to launch scripts from hotkeys and also key sequences. i would like to replace this with a simple always running script in the backbround that would do the same thing. Hotkeys no problem using the HotKeySet function however we use a lot of keysequence controls, can i do this? example the user may be in an application and type "{space}tok{space}" the script would then automatically fire and cut that text out and replace it with "{space}tesked ok with client{space}". i have looked at the _IsPressed function however it seems to only work for a single key, so i thought i could loop it to store the last 10 keys then run a find with in that for the triggers, however i am thinking that this would cause a significant performance issue as you keep capturing every key and then sending them back to the screen...... any thoughts on how i could do this. Cheers in advance.
-
Just to clarify are you asking, to look at a given directory and then copy any and all exe files to another given directory. Then look at the destination directory and execute any exe file that is located in it? This should be possible. But am unsure if this is what you mean
-
Sorry guys, feeling a bit stupid now....... it was that the window title was just "Scans" not "p:\scans" Will shrink away now..
-
I need to open explorer at a given directory and have it maximized. i have tried Run("explorer p:\scans") WinSetState("p:\scans", "", @SW_MAXIMIZE) but this doesnt work, What am i missing? All comment appreciated.
-
Thanks guys. i did know it could be done. but was pretty sure it was to GUI's but it is allways worth asking.
-
I have a script that opens a scanned graphic and then asks for a file number. i want the inputbox to stay on top but the user can click on the program behind to rotate the doc as required, to stop the user from having to alt tab (or mouse) back to the question. i have tried searching for this but i dont even know ehat it would be called ("stay on top"). ------------------Part of code------------------------------------------- WinWait("Microsoft Office Document Imaging","",5) If Not WinActive("Microsoft Office Document Imaging","") Then WinActivate("Microsoft Office Document Imaging","") WinWaitActive("Microsoft Office Document Imaging","",5) If Not WinActive("Microsoft Office Document Imaging","")Then MsgBox(4096,"ERROR","Please report error #2 to Andrew or Ben" &@CR&"This message will disapear in 10 seconds",10) Exit EndIf WinActivate("job number","") BlockInput(0) $jobnum=InputBox("Job number", "What is the Job Number") ------------------End of part------------------------------------------- Any assistance appreciated.