The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Front Ends > Road Runner > RR Plugins

Reply
 
Thread Tools Search this Thread Display Modes
Old 04-09-2008, 09:39 AM   #1
Constant Bitrate
chevyn8's CarPC Specs
 
chevyn8's Avatar
 
Join Date: Oct 2006
Posts: 212
My Photos: (1)
Search and Replace

Just a simple search and replace. Was developed for button changing...found a better way to do that...so I modified the code to do a universal search and replace within a file. This script is a byproduct of a different script. Someone may find it useful:

The original idea is that you can change anything in an INC file, without messing with the rest of the file. A skin could have one INC file, something like settings.txt, with all the settings in it, and make changes to a single item. Works like this:
Start the script run;path to sr.exe
Setvar's SROLD SRNEW SRFILETOEDIT SRTEXTORLINE
Script will then edit the file
SRTEXTORLINE:
TEXT will search for specific text and replace just that text.
search for /DEFINE fontsizemk1 "18" , replace with /DEFINE fontsizemk1 "22"

LINE will search for specific text and replace the whole line.
search for fontsizemk1, replace with /DEFINE fontsizemk1 "22"--better because you may not know the old font size or whatever value you are replacing.

This will also work on .skin files... you could replace an INC line to include a different file to change the look of a skin.
Located here: SR
__________________
CarPC nearly complete in my 82 Camaro. P4 1.8, 512RAM, 2140 PS, 7 inch generic touch screen. Shock v6.1.1
MediaLaunch for RR
Online Check for RR
Locker for RR
chevyn8 is offline   Reply With Quote
Sponsored Links
Old 04-11-2008, 01:19 PM   #2
Maximum Bitrate
 
Dalailama's Avatar
 
Join Date: Jan 2006
Location: Novara Italy
Vehicle: 1993 Mitsubishi Eclipse
Posts: 560
My Photos: (0)
It seems just what I was looking for!!!
..is it possible to use it to change some line in skin.ini without changing the others too?
...or does it work just with INC .txt file?

Edited--------
I jumped the line:
Quote:
This will also work on .skin files... you could replace an INC line to include a different file to change the look of a skin.



how can I do if I want to search and replace a string like this:
B20,120,100,315,70,"SKIN","skin browser"
??
__________________
Live today like it is your last day, and behave as though you will live forever...

MapMonkey Dalai skin-preview-download ITA-email me for ENG
Road Runner CrystalBlue skin-preview-beta release

Last edited by Dalailama; 04-11-2008 at 01:31 PM.
Dalailama is offline   Reply With Quote
Old 04-12-2008, 05:42 PM   #3
Constant Bitrate
chevyn8's CarPC Specs
 
chevyn8's Avatar
 
Join Date: Oct 2006
Posts: 212
My Photos: (1)
I found an old post from guino on the comma issue..... define comma in skin.ini:
cm=,
Then use $cm$ in place of the comma.
Example from MKIII exectbl.ini (not in that skin, just the version I have)
"MENURED","RUN;$skinpath$\sr.exe||setvar;srold;men u_OFF||setvar;srnew;menu_OFFred.png$CM$menu_OFFred .png$CM$menu_On.png$CM$menu_OFFred.png||setvar;srf iletoedit;menu.skin||setvar;srtextorline;line||wai t;2||reloadskin"

It changes the images the skin uses
skin.ini contains cm=,

If B20 is unique to that line, you should be able to search for B20 and replace with your line.
__________________
CarPC nearly complete in my 82 Camaro. P4 1.8, 512RAM, 2140 PS, 7 inch generic touch screen. Shock v6.1.1
MediaLaunch for RR
Online Check for RR
Locker for RR
chevyn8 is offline   Reply With Quote
Old 07-02-2008, 12:48 AM   #4
Maximum Bitrate
 
carputer1's Avatar
 
Join Date: Sep 2007
Posts: 613
My Photos: (0)
looking for a little help please.

i have this working via useing OSK to define the changes. but i can not get it to write
|| it will only write whats before it, not the || and whats after it.

i open OSK type SILABS||Silabs, ENTER , Script runs, Result = SILABS

any ideas guys, i did try $CM$=|| in the skin.ini but that did'nt work,may have that bit wrong in the code below,

1st code without $CM$

"NEWBUTTONIS"," ||OSKTOCMD;NEWBUTTON;ADDBUTTON"
"ADDBUTTON","RUN;$skinpath$\sr.exe||setvar;srold;$ REPLACE$||setvar;srnew;$NEWBUTTON$||setvar;srfilet oedit;buttonlist.txt||setvar;srtextorline;line||AD DTOFILE;$SKINPATH$buttonlist.txt;=$REPLACE$"

2nd code with $CM$

"NEWBUTTONIS"," ||OSKTOCMD;NEWBUTTON;ADDBUTTON"
"ADDBUTTON","RUN;$skinpath$\sr.exe||setvar;srold;$ REPLACE$||setvar;srnew;$NEWBUTTON$$CM$$NEWBUTTON$| |setvar;srfiletoedit;buttonlist.txt||setvar;srtext orline;line||ADDTOFILE;$SKINPATH$buttonlist.txt;=$ REPLACE$"


Thanks

ENJOY
carputer1 is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Digital FX 2.0 Transparent Released JohnWPB RR Skins 3759 03-07-2008 12:23 PM
New Ratings Plugin - based on a ratings database Blue ZX3 RR Plugins 42 01-26-2008 01:41 PM
XP wont search lez Off Topic 0 11-13-2005 02:45 AM
I know nuuuuthing............ dzrtram Newbie 34 06-14-2005 03:38 PM
Pioneer 2460 Replace CD function with AUX? captain caveman Car Audio 5 02-12-2005 12:09 PM


All times are GMT -5. The time now is 05:06 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics