I have
this
ub main()
dim
w_today
dim
oposstart
dim
oposend
dim
oinput
dim
ospeak
dim
ooutput
dim
thischar
' Say something incase
the URL load takes a while
hs.speak "Please wait while I get the weather for
you"
' get todays
weatherfrom sky web site
w_today =
hs.GetURL("sky.wsieurope.com","/weather/uk/seast/london.shtml",1,80)
oposstart = Instr ( w_today , "London") + len
("London Weather") ' because there are 2 of
them
oposend = Instr ( w_today , "Last
Updated")
ospeak = mid (w_today, oposstart, oposend - oposstart)
ospeak = Replace (ospeak,
" ",
"",1,-1,0)
' Scan thru string and remove any
wacky
chars with ascii less than
31
' Input and output variables to
eventually
make this a function
oinput = ospeak
ooutput = ""
For
k = 1 to len (oinput)
thischar = mid (oinput, k , 1
)
if
asc (thischar) > 31
then
ooutput = ooutput + thischar
else
ooutput = ooutput +
"" ' does nothing here in case I need
it
end
if
next
ospeak = ooutput
' This bit tries to put commas in
ospeak to make it sound
better
ospeak = Replace (ospeak,
"tonight", "tonight ,
",1,-1,0)
ospeak = Replace (ospeak,
"today", "today ,
",1,-1,0)
ospeak = Replace (ospeak,
"tomorrow", "tomorrow ,
",1,-1,0)
ospeak = Replace (ospeak,
"weather", "weather ,
",1,-1,0)
hs.speak ospeak
end sub
-----Original
Message-----
From: Nic Blinston
[mailto:ukha@xxxxxxx]
Sent: 15 May 2002 00:15
To: ukha_d@xxxxxxx
Subject: [ukha_d] RE: (ukha_d)
Help with HomeSeer UK weather script forNewbie
>I like the supplied
weather script for announcing the current weather
>forecast in your area but it only seems to
work if you can supply a US zip
>code.
>
>Has anyone managed to amend this script or
write one of there own to find
UK
>weather forecasts (specifically
Belfast)?
>
Now what might be really useful would be a way
to
incorporate live
weather forecast data into some scripts.
Example:
tomorrow it is
expected to be only 8 degrees, so the system
will
turn on the heating
a little earlier to get it nice and warm. I'm
sure
there could be
other uses - but is it
possible?
Nic
For more information: http://www.automatedhome.co.uk
Post message: ukha_d@xxxxxxx
Subscribe: ukha_d-subscribe@xxxxxxx
Unsubscribe:
ukha_d-unsubscribe@xxxxxxx
List owner:
ukha_d-owner@xxxxxxx
Your use
of
Yahoo! Groups is subject to the Yahoo!
Terms of Service.