Announcement

Collapse
No announcement yet.

UK 5 day town specific forecast.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UK 5 day town specific forecast.

    Has anyone updated this script?
    UK 5 day weather forecast
    It used to work a treat, but I guess the BBC have changed the format of the website.

    I get a 'mid' error in line 32, which from trawling through the message board seems to indicate the page has probably changed. I have tried commenting out this line to see what happens and HS speaks the source code for the entire page!

    I can't figure out what to change to make it work. Any help???

    Jon

    #2
    Jon,

    I tried using it last night and yep, I get the same error. It looks like the format of the html returned has changed. The script relies on searching for known strings to identify the days, forecasts, location, etc. Whenever the format of the page info returned changes, the script will need to be updated. If you're familiar with VBscript, you can probably change it to work. You just need to change the strings being searched for from the script.

    I had a quick go last night, and got as far as modifying to extract the location, days, min, maxes. Just a bit more to go to finish off the rest. I' ll probably finish it off tonight. I can post it when done if you would like.

    JimBob

    Comment


      #3
      JimBob,

      Thanks for your time.

      I am fairly new to scripting and HTML. I am even trying some asp! I am getting there slowly but my skills do not yet extend as far as deciphering someone elses script, working out how it operates and then re writing it!

      I would really appreciate it if you could get the script running again for me and post it back here.

      Thanks in advance for all your efforts. I'll let you know how it goes.

      Jon

      Comment


        #4
        Jon,

        I've just finished the updates. Checked it out OK for Stockport!

        Good luck.

        JimBob
        Attached Files

        Comment


          #5
          Cheers Jim,

          Works a treat.

          Jon

          Comment


            #6
            JimBob.
            I keep on getting an error on running the script
            Script error in file: Get_UK_Weather.txt "main","1450" Error: Object required: 'Get_UK_Weather'
            Can you help ?
            Smeg

            Comment


              #7
              Smeg,

              Is that the exact error message? The positioning of the colons, etc is important.
              I tried the script with your location id and it worked fine with me.

              Just to check -
              The script is called using the line:
              Get_UK_Weather.txt ("main", "1450")

              The script does not require any modification for different locations. It gets the location from the second parameter (I suppose you must realise this since you are using the Llantwit Major location id).

              Did you used to use the old script when it worked?

              Do you have other scripts which work ok?

              We don't have a Red Dwarf fan here do we, going from your Username?

              JimBob

              Comment


                #8
                JimBob
                I am calling the script from Event Properties, scripts/speech with the line :-
                &Get_UK_Weather.txt "main","1450" .
                The line is taken from the error log as :-
                30/09/2002 17:02:18~!~Error~!~Script error in file: &Get_UK_Weather.txt "main","1450" Error: Object required: 'Get_UK_Weather' complete.
                Tried to run the old script with .dll errors. Just as this thread started, so downloaded this as soon as you completed it. Then spent several days trying to get it to work.
                Used to watch Red Dwarf all the time, the nickname comes from my mob days, full name shortend and probably from others watching Red Dwarf as well.
                Thanks for the help.
                smeg

                Comment


                  #9
                  Smeg,

                  There's the answer. It's the way you're calling the script. You only use the ampersand when issuing a single line command. You also need the brackets around the parameters.
                  So, in your event, the script field should read:
                  Get_UK_Weather.txt ("main", "1450")

                  Cheers,
                  JimBob

                  Comment


                    #10
                    JimBob.
                    And as by magic this is the error that is produced :-
                    01/10/2002 19:29:23~!~Error~!~Script error in file: Get_UK_Weather.txt : 5:Invalid procedure call or argument: 'mid' in line 35.
                    Last message said i spent several days with it.
                    Tried both methods and with both i had errors, so thought it must be me doing something wrong.
                    Thanks for trying JimBob.
                    smeg

                    [This message was edited by smeg on Wednesday, 02 October 2002 at 07:22 AM.]

                    Comment

                    Working...
                    X