Jump to content

Import Current Weather to .txt File


Recommended Posts

Greetings!

Currently, I am trying to scrap a webpage for the current weather in Phoenix, AZ (USA). I found this: Some Dude's Page

but I am trying to get just the text of the current conditions to be exported to a text file in a format such as:

Temperature: 50F

Feels like: 46F

Humidity: 82%

Dew Point: 45F

Wind: 9 mph ESE

UV Index: N/AN/A

Visibility: 5.0 mi

Pressure: 29.63 in and steady

Sunrise: 7:31 AM

Sunset: 5:29 PM

Then save the file to the same location (over the last .txt file, thus rewriting over the previous). Then repeating this process every 5 minutes or so. This way I have the current weather conditions in a .txt file that I can then reference to using another program.

Does anyone have any solid ideas about how to do this? I cannot use javascript, my program uses a strange language (.mss) and it currently only allows me to pull up a .txt file to display as the screens only allows text (not images, widgets, etc).

The format of the above copied weather was taken from my portable copy of Weather Plus. If you would like, you can download a copy of it from my link here: Weather_Plus_Download

The program will operate on my thumb drive so the final destination will change depending on what USB port I'm plugged into so I may have to do something like:

$DestinFileName = StringLeft(@ScriptFullPath, 3) & "\Weather\Current_Weather.txt"

to make sure that it writes over the correct file no matter what port my thumb is plugged into.

Any thoughts or help on this would be fantastic. Thank you all very much!

your geek~

PS- After I wrote this I found a solid web site that I would like to scrape the data from Phoenix Weather. I think then I would just need to parse or rearrange the information into a standardized format and export/copy it to .txt file.

Edited by gr8BigGeek
Link to comment
Share on other sites

Experiment with the _IE* functions of the IE.au3 UDF. You should be able to read the text directly off the desired elements in the DOM. See the help file for example scripts under those functions.

:x

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...