Sardith Posted November 6, 2006 Share Posted November 6, 2006 $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 More sharing options...
Richard Robertson Posted November 6, 2006 Share Posted November 6, 2006 You could read the entire file to a string, then find the text right before it and after it. Thats how one of the IP UDFs works. Link to comment Share on other sites More sharing options...
GaryFrost Posted November 6, 2006 Share Posted November 6, 2006 Thought about using the IE UDFs? they are in the help, you might not even have to download the html file then. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Paulie Posted November 6, 2006 Share Posted November 6, 2006 I thought i could break from doing this... guess not @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 More sharing options...
Moderators SmOke_N Posted November 6, 2006 Moderators Share Posted November 6, 2006 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 More sharing options...
Sardith Posted November 7, 2006 Author Share Posted November 7, 2006 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 More sharing options...
Moderators SmOke_N Posted November 7, 2006 Moderators Share Posted November 7, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now