|
 |
12-09-2006, 10:42 AM
|
#1
|
|
FLAC
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,448
|
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?
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
12-09-2006, 01:38 PM
|
#2
|
|
Road Runner & Mp3car Gatherings Moderator
Join Date: Sep 2005
Location: West Palm Beach, Florida
Posts: 2,929
|
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
Last edited by JohnWPB; 12-09-2006 at 01:49 PM.
|
|
|
12-09-2006, 02:15 PM
|
#3
|
|
FLAC
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,448
|
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.
|
|
|
12-09-2006, 02:51 PM
|
#4
|
|
Road Runner & Mp3car Gatherings Moderator
Join Date: Sep 2005
Location: West Palm Beach, Florida
Posts: 2,929
|
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....
.
Last edited by JohnWPB; 12-09-2006 at 02:58 PM.
|
|
|
12-09-2006, 03:09 PM
|
#5
|
|
FLAC
Join Date: Sep 2003
Location: Ellicott City, MD
Posts: 1,507
|
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
|
|
|
12-09-2006, 03:38 PM
|
#6
|
|
FLAC
Join Date: Sep 2003
Location: Ellicott City, MD
Posts: 1,507
|
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"
-
|
|
|
12-09-2006, 04:13 PM
|
#7
|
|
FLAC
Join Date: Sep 2003
Location: Ellicott City, MD
Posts: 1,507
|
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
Last edited by Chuck; 12-09-2006 at 04:24 PM.
|
|
|
12-10-2006, 09:07 AM
|
#8
|
|
FLAC
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,448
|
Thanks Chuck and John. This is working fantastic.
Look....
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:18 PM.
| |