Results 1 to 8 of 8

Thread: Label Request

  1. #1
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756

    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 Images Attached Images  

  2. #2
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,717
    Blog Entries
    1

    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

  3. #3
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756
    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.

  4. #4
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,717
    Blog Entries
    1
    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

  5. #5
    FLAC Chuck's Avatar
    Join Date
    Sep 2003
    Location
    Ellicott City, MD
    Posts
    1,671
    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 Images Attached Images  
    2001 S10 ZR2

    Chucks Skin - to old

  6. #6
    FLAC Chuck's Avatar
    Join Date
    Sep 2003
    Location
    Ellicott City, MD
    Posts
    1,671
    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

  7. #7
    FLAC Chuck's Avatar
    Join Date
    Sep 2003
    Location
    Ellicott City, MD
    Posts
    1,671
    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

  8. #8
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756
    Thanks Chuck and John. This is working fantastic.
    Look....
    Attached Images Attached Images  

Similar Threads

  1. Scrollable Label?
    By JWise1203 in forum CF SDK
    Replies: 11
    Last Post: 11-03-2006, 11:21 PM
  2. Debugger Label Idea
    By lostreception in forum Road Runner
    Replies: 3
    Last Post: 09-08-2006, 02:58 AM
  3. Forum Slowness
    By Quattro in forum Mp3car Forum Suggestions/Comments
    Replies: 41
    Last Post: 10-28-2005, 06:50 PM
  4. Forum Really Slow
    By Quattro in forum Mp3car Forum Suggestions/Comments
    Replies: 58
    Last Post: 05-10-2005, 04:04 PM
  5. errors on the homepage
    By alti in forum Mp3car Forum Suggestions/Comments
    Replies: 61
    Last Post: 04-14-2005, 10:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •