Announcement

Collapse
No announcement yet.

Search Weather By ZIP code

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

  • Search Weather By ZIP code

    I am doing some skinning and wanted to be able to search the weather by the zip code. Does anyone know how?

    Basically i want to press a button and have the NUMOSK popup where i can enter a zip and pass that to RR as the active weather to display
    -Jesus- King of Kings Lord of Lords

  • #2
    anybody?
    -Jesus- King of Kings Lord of Lords

    Comment


    • #3
      Take a look at the shin code for rrgas. that should be aaa good staarting point for ya.
      HARDWARE: Fujitsu Stylistic ST5111w/WiFi and dock, internal Hitachi 500G HD, external 1TB HD, Sierra Wireless Aircard 550, DVD-RW, BoomzBox HD radio, XM Commander, Delorme GPS, Saitek X-52 Pro joystick, BluSoleil Bluetooth, TPMS, FB, Elm327

      Comment


      • #4
        Originally posted by GizmoQ View Post
        Take a look at the shin code for rrgas. that should be aaa good staarting point for ya.

        Looks like you a key is sticking there giz.




        oh and what is a shin code?





        double oh, how does that help him, RRGas can get GPS coords from a zipcode, but it doesn't make them available to RR or other plugins

        Comment


        • #5
          In the US you can use a zipcode for the weather. SO, you should be able to get the zip from the NumOSK, set the variable $CityWeather$ in RR to that number from the OSK, and then do a reload weather command.

          EDIT: Well not quite, after a little testing here.... let me dig around a little more and see if I can figure it out.....
          Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

          My Fiero Build Thread

          Comment


          • #7
            That too, could be the case...course would req Inet conn at time of lookup. I can add it to my RR todo list, probably would be in the July release, unless I find some free time between now and end of this month.
            RideRunner...The #1 FE, PERIOD.

            Current Project: DFXVoice [v1.0 Released]
            Next in line: RRMedia v2.0

            DFX 5.1.1 Skin
            Appstore Link

            My RideRunner Plugins
            RRMedia
            RRExtended
            DFXVoice

            "There are no bugs - only undocumented features."

            Comment


            • #8
              Originally posted by Blue ZX3 View Post
              That too, could be the case...course would req Inet conn at time of lookup. I can add it to my RR todo list, probably would be in the July release, unless I find some free time between now and end of this month.

              Seeing as you need the internet to lookup the weather I guess that would be a given

              Comment


              • #9
                I do have an active internet connection in the car. Thanks guys for picking this issue up. I am surprised no one asked about it until now. It would be great to be able to search by entering a zip code. Of course native functionality would be best but i am open to using a more strung together fashion.

                Thanks JohnW for diggin in here

                -Jesus- King of Kings Lord of Lords

                Comment


                • #10
                  I am not sure what the weather plugin is doing internally.... But, if I press and hold a button in the DFX skin, enter a zipcode in the OSK, it pulls the weather for that location, and sets the name of the city and state into the rr.ini.

                  Looking at the debug log, the command that is changing the zip to a city name is being handled internally to the plugin, thus no way I can see to see what commands are being fired.
                  Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

                  My Fiero Build Thread

                  Comment


                  • #11
                    Originally posted by JohnWPB View Post
                    I am not sure what the weather plugin is doing internally.... But, if I press and hold a button in the DFX skin, enter a zipcode in the OSK, it pulls the weather for that location, and sets the name of the city and state into the rr.ini.

                    Looking at the debug log, the command that is changing the zip to a city name is being handled internally to the plugin, thus no way I can see to see what commands are being fired.
                    Are you saying that if you use the press and hold function as opposed to the press function that it does work?
                    -Jesus- King of Kings Lord of Lords

                    Comment


                    • #12
                      in the DFX skin, yes, in general no. There is button code on the press and hold feature that triggers something that I honestly do not know in the weather plugin. BlueZX3 will have to take it from there, as he wrote the weather plugin. He has been helping a lot on the DFX skin, and thus added code from the buttons that handles something in the plugin.
                      Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

                      My Fiero Build Thread

                      Comment


                      • #13
                        I plan on adding this to the elite wings skin. I enhanced the weather page in that skin to include some of the functionality of the LSXvoid weather page.
                        -Jesus- King of Kings Lord of Lords

                        Comment


                        • #14
                          Get a city and state from a zipcode

                          Ok, I just tossed a quick script together to get the Weather from a zipcode. You will need the zips.dat file, and have it in the root RR folder.


                          Open the ExecTbl.ini for the skin you are using and put these 2 lines in there:

                          PHP Code:
                          "WeatherZip"," ||NUMOSKTOCMD;MyZipCode;GetCityName"
                          "GetCityName"
                          ,"RUNQ;$SKINPATH$Scripts\GetCityFromZip.exe|$MyZipCode$" 
                          Next simply put the attached file below into your skin/scripts folder. You can put it in the root of the skin folder if you wish, just change the exectbl line above to reflect the path where you put it.

                          Lastly, the command to fire it is "WeatherZip". Just put that code on a button. When you press the button, the NumOSK will pop up. Enter a zipcode, and it will retreive the weather.

                          Here is the source code if anyone wants to mess around with it:
                          PHP Code:

                          Get a city name and state from a zipcode
                          using the zips.dat file in the RR folder
                          Written by JohnWPB 05/26/10

                          $rr 
                          ObjCreate("RideRunner.sdk")
                          $RRpath $rr.getinfo("=$RRPATH$")

                          $RRFile $cmdlineraw
                          $ZipCode 
                          $cmdline[1]
                          $Location $RRpath "zips.dat"
                          $file FileOpen($Location0)

                          If 
                          $file = -1 Then
                              MsgBox
                          (0"Error""Zips.dat not found in the Road Runner Root Directory.")
                              Exit
                          EndIf

                          While 
                          1
                              $line 
                          FileReadLine($file)
                              If @
                          error = -1 Then ExitLoop
                              $result 
                          StringInStr($line,Chr(34) & $ZipCode Chr(34))
                                  If 
                          $result 0 Then
                                  $FullLine 
                          StringSplit($line",")
                                  
                          $CityName $FullLine[4]
                                  
                          $StateName $FullLine[5]
                                  
                          $WeatherCity $CityName ", " $StateName
                                  $WeatherCity 
                          StringReplace($WeatherCityChr(34), "")
                                  
                          $rr.execute ("Setvar;CityWeather;" $WeatherCity)
                                  
                          $rr.execute ("ReloadWeather")
                                  
                          FileClose($file)
                                  exit
                              EndIf
                          WEnd 
                          *** UPDATED CODE A FEW POSTS DOWN ***
                          Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

                          My Fiero Build Thread

                          Comment


                          • #15
                            shouldnt it be RideRunner.sdk

                            $rr = ObjCreate("RideRunner.sdk")
                            -Thanks
                            Mitch
                            www.rush2112.net

                            "Did you test it in carwings??"

                            Sun, Come shine my way
                            May healing waters bury all my pain
                            Wind, Carry me home
                            The fabric of reality is tearing apart
                            The piece of me that died
                            Will return To live again

                            Comment

                            Working...
                            X