The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RE: (ukha_d) Help with HomeSeer UK weather script forNewbie


  • To: <ukha_d@xxxxxxx>
  • Subject: RE: RE: (ukha_d) Help with HomeSeer UK weather script forNewbie
  • From: "Amar Nagi" <amar@xxxxxxx>
  • Date: Wed, 15 May 2002 00:41:44 +0100
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • Reply-to: ukha_d@xxxxxxx

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.



Yahoo! Groups Sponsor
ADVERTISEMENT
Height:   4 5 6 7  ft 0 1 2 3 4 5 6 7 8 9 10 11 in
Weight:  
Sex:   F M

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.

Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.