Clean Scripts.ini

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Clean Scripts.ini

Postby onenonymous » Mon Mar 17, 2008 9:38 pm

This script will clean the orphaned entries out of your Scripts.ini file. Please backup your files before running (just in case). I recommend Trix's Backupscript. The script is very basic. It reads through the Scripts.ini file looking for [SomeScript] followed by Filename=somefile.vbs, then checks to be sure that somefile.vbs exists. It puts up a message box for each script entry it can't find. Click yes to delete the entry or no to leave it in place. It repeats with a new message box for each missing script. Tested on MM3.

Installer file: CleanScriptsIni.mmip

Version 0.8 Update March 23, 2008
-Fixed code to delete entries which failed if the entries were at the end of the script
-Added Option sheet
-Removed access from scripts menu
-Added ability to turn on/off logging and messaging
-Changed logging to make it easier to copy the entry from the log and paste it back into the scripts.ini file if needed

Version 0.81 Update March 23, 2008
-Fixed code to show message box before changes

Here are screen shots:
Image

Image
Last edited by onenonymous on Sun Mar 23, 2008 2:16 pm, edited 3 times in total.
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby nynaevelan » Mon Mar 17, 2008 9:44 pm

One:

I cannot test this for you since I just cleaned up my scripts.ini in order to fix problem with RC4S script, but I have one query. Does this give a report of what it will be cleaned out of the ini file? If not, would it be possible to add some type of report, I would like to know what is being removed.

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4773
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby onenonymous » Mon Mar 17, 2008 9:49 pm

For now, it's pretty basic. It puts up a message box for each script entry it can't find. Click yes to delete the entry or no to leave it in place. It repeats with a new message box for each missing script.

When I get a chance, I'll enhance it to read through the entire file, the put up one dialog box showing all missing scripts with a checkbox by each to let you choose which ones to delete.
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby nynaevelan » Mon Mar 17, 2008 10:02 pm

No need to enhance any further, the message box would be enough for me to know whether I wanted it removed or not. One other question, if there are ini entries which are commented out, will it ask to delete those??

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4773
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby onenonymous » Mon Mar 17, 2008 10:08 pm

It shouldn't. It looks for [SomeScript] followed by Filename=somefile.vbs, so if those are commented, they will be ignored.
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby nynaevelan » Mon Mar 17, 2008 10:10 pm

Cool 8) Too bad I don't have any way to test it. :cry:

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4773
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby onenonymous » Sun Mar 23, 2008 1:05 pm

Updated script - see first post

Version 0.8 Update March 23, 2008
-Fixed code to delete entries which failed if the entries were at the end of the script
-Added Option sheet
-Removed access from scripts menu
-Added ability to turn on/off logging and messaging
-Changed logging to make it easier to copy the entry from the log and paste it back into the scripts.ini file if needed
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby RedX » Sun Mar 23, 2008 1:17 pm

Nice script!

Maybe add a messagebox if no problems were found as it was confusing to know wether it had run sucessfully or not (looked at the log file).

But still nice idea ;-)

Regards,
Red
RedX
 
Posts: 359
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Postby onenonymous » Sun Mar 23, 2008 1:48 pm

RedX wrote:Maybe add a messagebox if no problems were found as it was confusing to know wether it had run sucessfully or not (looked at the log file).
Regards,
Red

It is supposed to do as you suggest if the 2nd check box ("Ask permission each time") is checked. I checked my code and had a an extra 'Not' that I forgot to remove. I'll fix and re-post.

EDIT - installer has been updated.
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Postby Vyper » Sun Mar 23, 2008 6:57 pm

Works a treat. Image
Stop Button Freak
Vyper
 
Posts: 704
Joined: Tue May 23, 2006 5:53 pm

Postby nynaevelan » Tue Apr 15, 2008 7:03 am

One:

Is it possible to have this script review the scripts.ini file and put the script data in the order that the user specifies? Right now I have my script.ini file separated by script type and ordered alphabetically but each time I install a new script I have to manually reset the order. Is something like this possible or will I have to keep doing it manually??

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4773
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Postby onenonymous » Tue Apr 15, 2008 7:52 am

nynaevelan wrote:One:

Is it possible to have this script review the scripts.ini file and put the script data in the order that the user specifies? Right now I have my script.ini file separated by script type and ordered alphabetically but each time I install a new script I have to manually reset the order. Is something like this possible or will I have to keep doing it manually??

Nyn

I've got my working copy with a button to sort the entries alphabetically. I need to clean it up so it can be posted. I'll see about doing that this weekend.
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Re: Clean Scripts.ini

Postby Vyper » Sun Dec 14, 2008 10:59 pm

Did you ever do nyn's request? :)
Stop Button Freak
Vyper
 
Posts: 704
Joined: Tue May 23, 2006 5:53 pm

Re: Clean Scripts.ini

Postby nynaevelan » Sun Dec 14, 2008 11:17 pm

Wow Vyper I forgot about this one, but I've still having to update my ini manually and I install a lot of scripts but I guess this is the beast I have to live with. Unless of course the scripters figure out a way to not overwrite the ini entries if they already exist?? :wink:

Nyn
3.2x - Win7 Ultimate (Zen X-Fi 32GB/Zen 8GB/Zen Vision M 60GB)
Link to Favorite Scripts/Skins
nynaevelan
 
Posts: 4773
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Re: Clean Scripts.ini

Postby onenonymous » Thu Dec 18, 2008 6:07 pm

This one got back-burnered behind my other scripts (and life away from the monkey...). I'll see about re-visiting it one of these days. If I recall, I changed my parsing routines that reads scripts.ini in my RCFS script, and intended to use that in this one - just never got to it.
~One
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

Next

Return to Need Help with Addons?

Who is online

Users browsing this forum: SquirrelScript and 10 guests