Jump to content
Sign in to follow this  
BartW

Read HTTP in enbeded website

Recommended Posts

BartW

Hello all.

I am writing a script for to put the time in a system.

The disadvantage is that this goes by means of HTML page.

Now I am already up to that point that the script can log in and go’s to the correct page .

Only now I cannot read the part that I need to fill in the time.

It seems that it is on incorporated browser .

I have made a JPG so it whot be more clear what the problem is.

The green part is what autoit can read.

Red is what autoit can’t read .

Can any one give me a hint of how I can approach that piece.

Thanks in advance

Bart

post-66367-0-95234500-1329922897_thumb.j

Edited by BartW

Share this post


Link to post
Share on other sites
Aipion

You will have to manually identity the tag used to Embed the webpage by using a browser and in that tag they will have the URL. simply use that URL to do what you were trying to do.

E.G.

Posted Image

Edited by Aipion

Share this post


Link to post
Share on other sites
BartW

well i think i don't get it.

i can not naviaget to the link it returs me to the same page.

and the _IEBodyReadHTML( $oIE) needs a object to work.

Share this post


Link to post
Share on other sites
Aipion

well i think i don't get it.

i can not naviaget to the link it returs me to the same page.

and the _IEBodyReadHTML( $oIE) needs a object to work.

By the way you can use the following to get the HTML.

#include <Inet.au3>
_INetGetSource($s_URL [, $bString = 'True'])
Edited by Aipion

Share this post


Link to post
Share on other sites
BartW

well i can not let you see the site because it an internal web site of a very old machine.

I know this makes it harder to help me.

I wil test the _INetGetSource if i can see inside

Share this post


Link to post
Share on other sites
somdcomputerguy

From the screenshot you posted, and that you said it's a 'very old' machine, the site is probably framed pages. Look at the source code of the main page, and get the URL's in the frameset tags. Load each one separately (just in your browser), and by trial and error, you'll get the one you need. The AutoIt code needed now is the next step..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
BartW

thank you all.

for the good pointers

After some frustrating hours I finally go it to work.

the problem was the embedded url looks almost the same as the main url.

there was only 1 character difference.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • wakillon
      By wakillon
      HttpHeaderWatcher v1.0.1.3
       

      Some time ago, some members asked how to see the Http Requests.
      There are quite a few external applications but not in AutoIt!
      HttpHeaderWatcher in association with WinPcap, very modestly solves this lack.
       
      Once done this http watcher, i asked me : why not Re-build a WinHttp Request in AutoIt from a selected Request in one Click ?
      So i have added a "Create au3" button who open the WinHttp Request of your choice in AutoIt format in SciTE Editor.
      Voila voila, hope it can help ! 
      Buttons were made online with chimply.com the easy and free buttons generator !
      See Help for more infos.
      previous downloads : 253
      source and executable are available in the Download Section
      Hope you like it !
    • NiftRex
      By NiftRex
      I'm trying to get an array from a website so that I can just get the url, but I am not sure how. I read a bit of arrays but I have a feeling I'd have to be writing a lot more than what I should be. I will include the script I have so far and the API url for what I want.
       
      API: https://api.fast.com/netflix/speedtest?https=true&token=YXNkZmFzZGxmbnNkYWZoYXNkZmhrYWxm&urlCount=1 (I want the 'url' array that contains the url)
       
      Code:
      #include <MsgBoxConstants.au3> #include <Inet.au3> #include <Array.au3> $site = _INetGetSource('http://api.fast.com/netflix/speedtest?https=true&token=YXNkZmFzZGxmbnNkYWZoYXNkZmhrYWxm&urlCount=1') MsgBox($MB_SYSTEMMODAL, "Title", $site[1])  
    • Jefrey
      By Jefrey
      I've ported these two functions from PHP to AU3 to work with URLs.
      Made them for those who work with libraries like HTTP.au3 (not the one I coded), that needs passing the server domain, path, etc., instead of the full URL.
      Grab the lib here.
      ParseURL( $sURL )
      Parses the URL and splits it into defined parts. Returns an array:
      [0] = Full URL (same as $sURL) [1] = Protocol (i.e.: http, https, ftp, ws...) [2] = Domain [3] = Port (or null if not specified) [4] = Path (or null if not specified) [5] = Query string (everything after the ? - or null if not specified) Example:
      $aExample = ParseURL("https://google.com:8080/?name=doe") MsgBox(0, "Test", "URL: " & $aExample[0] & @CRLF & _ "Protocol: " & $aExample[1] & @CRLF & _ "Domain: " & $aExample[2] & @CRLF & _ "Port: " & $aExample[3] & @CRLF & _ "Path: " & $aExample[4] & @CRLF & _ "Query string: " & $aExample[5])  
      ParseStr( $sStr )
      Parses a query string (similar to the [5] of the previous function) and returns a multidimensional array, where:
      [0][0] = number of variables found [0][1] = ununsed [1][0] = key name of the first variable [1][1] = first variable value (already URL decoded) [n][0] = key name of the nth variable [n][1] = nth variable value (already URL decoded) Example:
      include <Array.au3> ; need only to do _ArrayDisplay, not needed by the lib _ArrayDisplay(ParseStr("foo=bar&test=lol%20123")) #cs Result is: [0][0] = 2 [0][1] = ununsed [1][0] = foo [1][1] = bar [2][0] = test [2][1] = lol 123 #ce Feel free to fork!
    • mjolnirmarkiv
      By mjolnirmarkiv
      Hi!
      I have a potential problem of memory leakage in the script I wrote and wonder if anyone will be able to suggest a potential source of the problem?
      The script is desgined to log into secure website and constantly send HTTP GET request to obtain a list of tasks the client has assigned to us (the tasks are auctions, so swift actions are neccessary, hence the script) and then occasionally send HTTP POST to accept certain tasks based on certain criteria. It works 24/7 and works alright, but I noticed that amount of RAM it uses will increase significantly over time (say, it jumps from 20 000 K to 100 000 K in a few days).
      I cannot post the entire script: it modestly big, also might contatin some sensetive information. But here's the main loop (like, exactly):
      While True If Script_SignIn() And Script_GetTasks() Then Script_AcceptTasks() Sleep(10) WEnd The Script_ functions are here just to simplify the structure, they don't pass any parameters to each other, just return True \ False when finished and change some global variables when executed. Entire GUI is in OnEvent mode.
      TMS_ functions are where the actual work is done, names are self-explanatory:
      TMS_SignIn($sURL, $sUsername, $sPassword) -- returns $sAuthKeys (used subsequently in other functions to authenticate yourself, while session is active). TMS_GetTasks(ByRef $oHTTP, $sURL, $sAuthKeys) -- this function is running constantly returning $avTasks (basically a table with all information I need to accept them), I'm passing a global variable $g_oHTTP to it, it creates HTTP object only once per session (hence ByRef, I don't want to locally create HTTP object at every pass, just create once and reuse) and in next loop I pass the object the function created to it again, $g_oHTTP is destroyed when session has ended and recreated in next loop after re-login. TMS_AcceptTasks(ByRef $avTasks, $sURL, $sAuthKeys) -- returns True\False (changes $avTasks table slightly -- the status of acceptance if it's successful). TMS_SignOut($sURL, $sAuthKeys) -- returns True\False. These functions create local HTTP and HTML objects inside as well, I even "= 0" them at the end, even though I don't think I need to do this, since they are local variables. Still the problem persists.
      Any ideas where to look?
    • Chiitus
      By Chiitus
      Hello guys!
      Im wanting to send a HTTP PATCH method to GitHubAPI without authentication, but i just found how to send GET and POST methods.
      Any help please,
      THanks adv!
       
      EDIT: Problem solved!
      Using curl cmd now, thanks!
×