Jump to content

Question


Sardith
 Share

Recommended Posts

$Code = "48313"
$File = _TempFile()
INetGet("http://www.weather.com/weather/local/" & $Code, $File, -1, 0)
$Line = FileReadLine($File, 29)
$LineA = StringSplit($Line, "")
$Title = FileReadLine($File, 18)
;Get city and state name, 34 from left, 22 from the right
$CityNameA = StringTrimLeft($Title, 34)
$CityName = StringTrimRight($CityNameA, 22)
$Fahrenheit = $LineA[38] & $LineA[39] & " °F"; Temperature 38, 39

I have a question. I understand how 'INetGet' works, it saves the target webpage in html, to the destination of choice. What I don't understand, is how the FileReadline works; I do but, do you just guess and check? Like say like I want to read the wind speed, do I just guess line numbers or is there a html editor that would allow me to view lines or?

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

I thought i could break from doing this... guess not :whistle:;)

@OP,

For future reference, when posting a thread , make its title remotely pertinent to question/subject you are posting about.

This is the support section of the forum, its meant for questions, so naming a thread "I Have A Problem", or "Question", or "Help Me, My Code Doesn't Work", or "Noob Requesting Assistance" Is redundant, and makes it harder for anyone else who has the same/similar questions as you to find the answer by searching the forums, which in turn means people often have to make extra threads and people who are answering the threads just end up repeating themselves several times over.

It is counter-productive.

Link to comment
Share on other sites

  • Moderators

Thought about using the IE UDFs? they are in the help, you might not even have to download the html file then.

Or _InetGetSource() + _StringBetween() in beta?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Smoke I took a look at _InetGetSource, thanks for the suggestion. Im searching for some examples of how to use it. Do you have any on hand?

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

  • Moderators

Smoke I took a look at _InetGetSource, thanks for the suggestion. Im searching for some examples of how to use it. Do you have any on hand?

It's pretty straight forward, use it just like FileRead() but for a URL as the file to read.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...