Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Weather Warnings Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
brian2170
Newbie
Newbie


Joined: April 29 2008
Online Status: Offline
Posts: 15
Posted: April 29 2008 at 18:01 | IP Logged Quote brian2170

When I ran the macro last night, I was getting "short term forcast" alerts. Is there any way to filter those out?
    Thanks
    Brian
Back to Top View brian2170's Profile Search for other posts by brian2170
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: April 29 2008 at 19:23 | IP Logged Quote TonyNo

Ah. I added, but did not document, that filtering.

This was added right after the regex...

Code:
Jump if( pos( "[LOCAL8]", "Statement") <> 0, 4, 1)      
Jump if( pos( "[LOCAL8]", "Forecast") <> 0, 3, 1)      
Jump if( pos( "[LOCAL8]", "Heat advisory") <> 0, 2, 1)


Whoa. Looks like the code I linked to is a lot older that what I now use. I'll put something together.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
brian2170
Newbie
Newbie


Joined: April 29 2008
Online Status: Offline
Posts: 15
Posted: April 29 2008 at 20:13 | IP Logged Quote brian2170

Thank you for the quick response!!
Brian
Back to Top View brian2170's Profile Search for other posts by brian2170
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: April 29 2008 at 23:00 | IP Logged Quote TonyNo

OK, updated WWA2.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
brian2170
Newbie
Newbie


Joined: April 29 2008
Online Status: Offline
Posts: 15
Posted: April 30 2008 at 07:17 | IP Logged Quote brian2170

Thank you!
Back to Top View brian2170's Profile Search for other posts by brian2170
 
judetf
Senior Member
Senior Member


Joined: January 23 2008
Online Status: Offline
Posts: 234
Posted: April 30 2008 at 10:01 | IP Logged Quote judetf

FWIW, when I first found Tony's macros on the weather and the weather alerts, I decided to just use weatherunderground for both purposes and so far what I concocted seems to work pretty well, and I'll describe in case it works for others.

When my weatherunderground page adds an alert, it always uses an image named SVG.gif, then provides a hyperlink to the actual warning (sometimes the text of the hyperlink is informative, sometimes not).

All I did was to add an extra few lines to Tony's main Get Weather macro to search for SVG.gif and, if it finds it, capture the full <a href...> tag into a global variable. I screen the variable so that if it has changed since the last time it was run (and assuming it's not blank (ie, no warning)), it sends me an e-mail with the whole variable so I can see, at a glance, what the warning is and also click on the link to get the full text if need be.

Probably not as robust as Tony's full macro, but I like that all of my weather info comes from just one URL, and the code to make this all work is very straightforward and relies on a simple interpretation of the page content.

jtf

Back to Top View judetf's Profile Search for other posts by judetf
 
brian2170
Newbie
Newbie


Joined: April 29 2008
Online Status: Offline
Posts: 15
Posted: July 26 2008 at 07:53 | IP Logged Quote brian2170

The weather macro works great , I could use some help with the code to ignore severe thunderstorm watch, and severe thunderstorm warnings. I have tried this code, but it doesnt seem to work   if( pos( "[LOCAL8]", "Thunderstorm Warning ") <> 0, 8, 1)

Any ideas on what im doing wrong??
    Thanks
    Brian
Back to Top View brian2170's Profile Search for other posts by brian2170
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: July 26 2008 at 08:46 | IP Logged Quote BeachBum

Brian, the only thought that came to my mine was try posw if you’re dealing with a long string.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: July 26 2008 at 11:10 | IP Logged Quote TonyNo

Starting with the original macro, try this...

Code:
55 JUMP if( pos( "[LOCAL8]", "Thunderstorm") <> 0, 5, 1)
...
100 Jump if( pos("[LOCAL1]", "", [LOCAL3])=0, 1, -7)


Edited by TonyNo - July 26 2008 at 11:10
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

<< Prev Page of 2
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum