Jump to content

Arthfael

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Arthfael

  1. I just tried it and it won't work. The HTML source code is now only the META data of the page and nothing else. I tried to modify the following: Local $oIE = _IEAttach("Logged in") $sHtml=_IEBodyReadHTML($oIE) $Number = _StringBetween($sHtml, ',"PID":', ',"address":"') If IsArray($Number) Then $Number = $Number[0] Else $Number='not found' EndIf MsgBox($MB_ICONINFORMATION,'Number:',$Number) ConsoleWrite($sHtml) ConsoleWrite($Number) But it still doesn't want to work. I really can't figure out why the _StringBetween doesn't want to work. I have seen videos online and that where doing the same and it won't work for me at all.
  2. For safety purposes I have removed some of the data and included only one entry, however all entries have the exact same format. So, for the example above, I am interested in writing 025741963 The information is at: PID":025741963,"address However, for some reason, with every example and mode of doing it, I would not ever get 1 ID out of the string or even anything else from the HTML source code.
  3. Hello, I am currently hitting an issue like the one above however I have tried multiple ways of doing it, however every time I do it, the code fails for me. Instead of opening a new instance of IE and reading the HTML source, I attach to an already open page and read the HTML from there. Once I have the HTML source, then I try read the ID's on the page into an Array, but for some reason, every time I try an example it gives me "0" or "not found" each time. Does any of you know what I am doing wrong? #include "Forms\Welcome.isf" #include "Forms\Main.isf" #include "Functions.au3" #include "IE.au3" #include "String.au3" #include "Array.au3" #include "MsgBoxConstants.au3" Local $oIE = _IEAttach("Logged in") $sHTML=_IEBodyReadHTML($oIE) $PID = _StringBetween($sHTML, ',"PID":', ',"address":"') If IsArray($PID) Then $PID = $PID[0] Else $PID='not found' EndIf ConsoleWrite($sHTML) ConsoleWrite($PID) Also, please note that the HTML source code is registered correctly as I can see in the console, hence the reason of writing it in the console to check. Thanks, Sep
  4. Thanks for the help. I will try to figure out how to modify it to work for my needs
  5. I am using Fiddler to find the session key that the program randomly assigns every time I start the program. ( Cookie: s=xxxxxxxx-xxxxxxx-xxxxxxxxxxx-xxxxxxxxxxxxx; s=xxxxxxxx-xxxxxxx-xxxxxxxxxxx-xxxxxxxxxxxxx ) Regarding AutoIt, I want to use it to sent requests with different Count and ccAD ( count=5&ccAD=10&ID= ) every 3seconds. I have the counts and ccAD's in a excel sheet
  6. Hi and thanks for the reply. The problem is that I don't know how to exactly change the code with the information that I got from Fiddler. One question, is it ok if I use HTTP instead of HTTPS (used by the program)? will that work?
  7. Hello everyone, I am really new to AutoIt(found it about a week ago) and I really like it but now I am kinda stuck at a problem that is a bit to much for me( for now at least ). I read on the forums and searched on google and I found some stuff regarding my issue but I am don't understand it that good. The thing is I am trying to send HTTPS POST requests to a server so that I am cutting lost time with manually imputing data in a program that a client needs. After a few searches on google I found about a program called Fiddler that scans the connections and after a bit of "pressing buttons" around I found the raw requests that my program to the server. This is the POST request: POST https://trade.xxxxx.xxxxx/IVV HTTP/1.1 Host: trade.xxxxx.xxxxx Connection: keep-alive Content-Length: 24 Origin: https://trade.xxxxx.xxxxx/ X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1003.1 Safari/535.19 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept: */* Referer: https://trade.xxxxx.xxxxx/IVV Accept-Encoding: gzip,deflate Accept-Language: en Accept-Charset: iso-8859-1,*,utf-8 Cookie: s=xxxxxxxx-xxxxxxx-xxxxxxxxxxx-xxxxxxxxxxxxx; s=xxxxxxxx-xxxxxxx-xxxxxxxxxxx-xxxxxxxxxxxxx count=5&ccAD=10&ID= Can someone point me in direction on how to simulate this request with AutoIt? P.S: I have tried to modify the scripts found on these links but with no succes. (I don't fully understand the mechanics for now) 1. '?do=embed' frameborder='0' data-embedContent>> 2. '?do=embed' frameborder='0' data-embedContent>> 3. http://brugbart.com/http-post-request-autoit
×
×
  • Create New...