Author |
|
brian2170 Newbie
Joined: April 29 2008
Online Status: Offline Posts: 15
|
Posted: April 29 2008 at 18:01 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 29 2008 at 19:23 | IP Logged
|
|
|
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 |
|
|
brian2170 Newbie
Joined: April 29 2008
Online Status: Offline Posts: 15
|
Posted: April 29 2008 at 20:13 | IP Logged
|
|
|
Thank you for the quick response!!
Brian
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 29 2008 at 23:00 | IP Logged
|
|
|
OK, updated WWA2.
|
Back to Top |
|
|
brian2170 Newbie
Joined: April 29 2008
Online Status: Offline Posts: 15
|
Posted: April 30 2008 at 07:17 | IP Logged
|
|
|
Thank you!
|
Back to Top |
|
|
judetf Senior Member
Joined: January 23 2008
Online Status: Offline Posts: 234
|
Posted: April 30 2008 at 10:01 | IP Logged
|
|
|
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 |
|
|
brian2170 Newbie
Joined: April 29 2008
Online Status: Offline Posts: 15
|
Posted: July 26 2008 at 07:53 | IP Logged
|
|
|
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 |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 26 2008 at 08:46 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: July 26 2008 at 11:10 | IP Logged
|
|
|
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 |
|
|