Jump to content

Recommended Posts

Posted (edited)

All updates are now kept at: https://sourceforge.net/projects/weatherwidget/

This is still being created (The GUI) so some of the labels will be out of alignment ($OverViewTime & $OverViewStatus) if you get an out-of-aligned label (IE, not centered) then please let me know what the exact text is by going to Weather.com and putting in the zip code you used and got the error.

If you get a MsgBox that states "Error" then please do the same as above, but this time tell me what the labels are for "Right Now", "Tomorrow", "Tonight" etc. etc.

The UDF will get all the information needed from Weather.com and the script will create a GUI to display all the information.

Screenshots:

On Run Request Zip Code

(My cute bunny :unsure:)

Posted Image

Right Now Gui (Default)

Posted Image

Context Menu (To change GUI's/Refresh/Close)

Posted Image

[source]

WeatherUDF.au3

[Widget]

Widget.au3

Let me know what you think!

Edited by Damein

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted (edited)

Nice, a lot different from my :unsure:

Tested: And I'm getting $Temp1 in _GetOverViewTemperature() not being declared, plus is this only for the USA?

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Thanks, I hope to include a ton more stuff to it.

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted

Am i the only one ho can't use it?

What Zip code should i type, and how to get it?

Why the user can't type city, as on the website, why the zip code?

Anyway, i geting many syntax errors, even if i type my home zip code.

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted (edited)

After my initial post of seeing the images I decided to have a play and unlike my UDF it appears there are errors with the SRE's.

And to answer your question MrCreatoR, it appears the URL is to blame e.g. http://www.weather.com/weather/today/washingtondc doesn't work, but a ZIP code will. At least Google is a little forgiving.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Hmph, for some reason Weather.com decided to use "CHance of Rain" instead of "Chance of Precip:" which is what I use to have. I'll do a little tweaking and post the results.

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted

*** EDIT ***

Alright, I fixed the problem with precipitation. FOr now everything should work, and yes, its zip code only and USA (Unless Weather.com can locate you)

I will be releasing another version in a few days, but I will go ahead and release the fixed bug one.

First post is updated.

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted
Posted

Thank you, and thanks Kaotkbliss, let me know how it works out for you!

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted (edited)

I concur, status of "Sunny / Windy" hangs off the edge.

see todays weather for (http://www.weather.com/weather/today/76504)

However I am getting the pic, nicely done.

Edited by iamtheky

  Reveal hidden contents

Posted

Alright, thanks. And yeah, a StringLen might do nicely, I know of a few things I need to adjust (Including after like, 9PM the Overview changes from Right Now, Today, Tonght, Tomorrow > Right Now, Tonight, Tomorrow, Tomorrow Night) so I need to do a little adjusting to allow that instead of the other menu. But thanks so far :unsure:

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted

or if there are multiple status just return the first, Im sure my regexp is horrible but it seems to make due.

If $i = 1 Then
        If stringregexp ($status1[0] , "(.*?)/(.*?)") Then
        $SplitStatus = stringsplit ($Status1[0] , "/" , 3)
    $OverViewStatus[1] = $SplitStatus[0]
Else
    $OverViewStatus[1] = $Status1[0]
    Endif

  Reveal hidden contents

  • 6 months later...
Posted

Hello Damein! Thank you for posting your UDF and sample code.

When running your example code with the weather.udf, I get this error:

C:\Program Files\AutoIt3\Include\WeatherUDF.au3 (83) : ==> Subscript used with non-Array variable.:

$OverViewStatus[2] = $Status2[0]

$OverViewStatus[2] = $Status2^ ERROR

This also happens with previous lines that reference $image1[0], etc.

Thanks for looking into it, if you have a spare moment.

:D

Posted

Weather.com must of changed some stuff, give me a few minutes and I'll see what I can do. Gotta freshen up on the code :D

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted (edited)

Ah, they changed the way they pass the URL for the website.

I figured out how to do it, but I'm going to have to play with it to get everything right.

For starters I had to add this to the Example Script:

$ZipCode = InputBox("Zip code", "Please input your zip code")
$ZipCode2 = "http://www.zip-codes.com/zip-code/" & $ZipCode
Global $sSource = BinaryToString(InetRead($ZipCode2))
$City = StringRegExp($sSource,'(?i)(?s)<tr valign="top"><td id="rowB"><a href="/zip_database_fields.asp#city" class="rowL" target="_blank">City:</a></td><td id="rowB"><a href="(.*?)">(.*?)</a>',1)
$State = StringRegExp($sSource,'(?i)(?s)<tr valign="top"><td id="rowA"><a href="/zip_database_fields.asp#statecode" class="rowL" target="_blank">State:</a></td><td id="rowA"><a href="(.*?)">(.*?)</a>',1)
$Url = 'http://www.weather.com/weather/today/' & $City[1] & '+' & $State[1] & '+' & $Zipcode

So I have the right URL now, and I can pull data, but it might take me a few days until I can sit down and setup all the StringRegExp.

If you want, you can always do it, it shouldn't be hard after that. All you have to do in the UDF for now is replace all the:

Global $sSource = BinaryToString(InetRead("http://www.weather.com/weather/today/" & $ZipCode))

To be:

Global $sSource = BinaryToString(InetRead($Url))

Thanks for bringing this up, I will look into it.

Edited by Damein

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Posted

If you want go ahead, I'll check 'em out :D

MCR.jpg?t=1286371579

  Reveal hidden contents

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

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
  • Recently Browsing   0 members

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