Announcement

Collapse
No announcement yet.

Label Request

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

  • Label Request

    Guino, or the other gurus here, I am in need of a label that shows me the contents of a file. In my Radio.skin I have 6 buttons for 6 presets of radio stations. The buttons have the Command "FMPRESET;PRESET1" and so on.
    Now when you hold the button for 2 sec it will create a file called PRESET1.fm in the RR Folder. In that file there is the frequency which you just saved.
    By the way the Command FMPRESET is not in SkinCommands.txt. Anyways, I would like to show that label next to my preset button on the skin. See attatchen image. Saving and recalling the preset is no problem it works great, the trick is when you reprogram the button to a different frequency the label assosiated with the file should change also. In other words when you change the file the label should read the new frequency. Is something like this possible?
    Attached Files

  • #2
    Saving frequencies for radio stations

    I am definately no expert here, but I may be able to help a little bit. I have a very similar function with the buttons on my weather page. When pressed and held, the OSK asks for the city name, and writes that to the rr.ini file. WHen the value is in the ini, RR loads it automatically when RR starts. It will remain whatever freq it was, until the button is held and then updated in the ini.

    Going this route, you will not have to have individual files for each preset.

    Something like:
    "SETVAR;Preset1;$FREQUENCE$||SAVETOINI;Preset1;$FR EQUENCE$" (Purposely misspelled, as stated in the skincommands.txt file, for older Media Car Support)

    I have not tested the line above, but it SHOULD work, (make sure to remove the space in FREQUENCE above that the forum inserted)

    This would then save the following line in the rr,ini

    Preset1=94.7


    To call that back up as a label on the button use:

    "=$Preset1$"

    Another advantage of this, is if you plan to make this skin public, then when the radio skin is opened for the first time, the presets will be blank, and all that would be required it to press and hold them to add the info to the rr.ini. No lines would have to be added manually
    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


    • #3
      Going with that command
      "SETVAR;Preset1;$Frequence$||SAVETOINI;Preset1;$Fr equence$"
      does not save the Frequence displayed in the skin.
      In RR.ini I get the line Preset1=
      no frequency displayed.

      Comment


      • #4
        What code were you using to save the info to the text file? Use whatever variable you were using to save it to your text file and give that a try. I do not have a radio on this computer, so I can't test it out here unfortunately.

        Also make sure the Space in Frequence has been removed if you are copying and pasting....



        .
        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


        • #5
          I just changed my radio presets to save labels last week

          It is very simple

          I also use these for my alarm and changer now

          Give me a minute and I will post the code I used
          Attached Files
          2001 S10 ZR2

          Chucks Skin - to old

          Comment


          • #6
            My code

            Code:
            Radio.skin
            
            buttons
            B20,22,180,70,70,"FMPRESET;PRESET1||SETVARBYCODE;FMP01;FREQUENCE",""
            B20,97,180,70,70,"FMPRESET;PRESET2||SETVARBYCODE;FMP02;FREQUENCE",""
            B20,175,180,70,70,"FMPRESET;PRESET3||SETVARBYCODE;FMP03;FREQUENCE",""
            B20,21,250,70,68,"FMPRESET;PRESET4||SETVARBYCODE;FMP04;FREQUENCE",""
            B20,97,250,70,68,"FMPRESET;PRESET5||SETVARBYCODE;FMP05;FREQUENCE",""
            B20,175,250,70,68,"FMPRESET;PRESET6||SETVARBYCODE;FMP06;FREQUENCE",""
            
            labels
            L20,186,273,50,30,255,255,255,13,"Arial Narrow:B","=$FMP06$","CENTER"
            L20,108,273,50,30,255,255,255,13,"Arial Narrow:B","=$FMP05$","CENTER"
            L20,33,273,50,30,255,255,255,13,"Arial Narrow:B","=$FMP04$","CENTER"
            L20,186,205,50,30,255,255,255,13,"Arial Narrow:B","=$FMP03$","CENTER"
            L20,108,205,50,30,255,255,255,13,"Arial Narrow:B","=$FMP02$","CENTER"
            L20,33,205,50,30,255,255,255,13,"Arial Narrow:B","=$FMP01$","CENTER"
            
            
            ExecTBL.ini
            
            loads preset labels on skin start
            "ONSKINSTART","FMPRESETLOAD"
            
            OR
            
            loads preset labels on Radio start
            "RADIO","LOAD;Radio_Player.skin||FMPRESETLOAD"
            
            
            You will need a way to save your presets
            I made a command called "SAVESTUFF","FMPRESETSAVE||XXXXXX||XXXXXXX||XXXXXXX" and added it to all my quit,reboot,hiber and such.
            
            
            "FMPRESETSAVE","SAVETOINI;FMPRESETS;<<$FMP01$<<$FMP02$<<$FMP03$<<$FMP04$<<$FMP05$<<$FMP06$"
            "FMPRESETLOAD","SETVARFROM;FMPRESETS;<<FMP01<<FMP02<<FMP03<<FMP04<<FMP05<<FMP06"
            
            -
            2001 S10 ZR2

            Chucks Skin - to old

            Comment


            • #7
              Here is an easier way but it will save every time you press a button and use more CPU's

              Code:
              RADIO.SKIN
              
              buttons
              B20,22,180,70,70,"FMPRESET;PRESET1||SETVARBYCODE;FMP01;FREQUENCE||SAVETOINI;FMP01;$FMP01$",""
              B20,97,180,70,70,"FMPRESET;PRESET2||SETVARBYCODE;FMP02;FREQUENCE||SAVETOINI;FMP02;$FMP02$",""
              B20,175,180,70,70,"FMPRESET;PRESET3||SETVARBYCODE;FMP03;FREQUENCE||SAVETOINI;FMP03;$FMP03$",""
              B20,21,250,70,68,"FMPRESET;PRESET4||SETVARBYCODE;FMP04;FREQUENCE||SAVETOINI;FMP04;$FMP04$",""
              B20,97,250,70,68,"FMPRESET;PRESET5||SETVARBYCODE;FMP05;FREQUENCE||SAVETOINI;FMP05;$FMP05$",""
              B20,175,250,70,68,"FMPRESET;PRESET6||SETVARBYCODE;FMP06;FREQUENCE||SAVETOINI;FMP06;$FMP06$",""
              
              labels
              L20,186,273,50,30,255,255,255,13,"Arial Narrow:B","=$FMP06$","CENTER"
              L20,108,273,50,30,255,255,255,13,"Arial Narrow:B","=$FMP05$","CENTER"
              L20,33,273,50,30,255,255,255,13,"Arial Narrow:B","=$FMP04$","CENTER"
              L20,186,205,50,30,255,255,255,13,"Arial Narrow:B","=$FMP03$","CENTER"
              L20,108,205,50,30,255,255,255,13,"Arial Narrow:B","=$FMP02$","CENTER"
              L20,33,205,50,30,255,255,255,13,"Arial Narrow:B","=$FMP01$","CENTER"
              
              and thats it
              2001 S10 ZR2

              Chucks Skin - to old

              Comment


              • #8
                Thanks Chuck and John. This is working fantastic.
                Look....
                Attached Files

                Comment

                Working...
                X