Clean Scripts.ini
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
Clean Scripts.ini
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:
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:
Last edited by onenonymous on Sun Mar 23, 2008 2:16 pm, edited 3 times in total.
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
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
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 Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
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.
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.
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
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
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Cool Too bad I don't have any way to test it.
Nyn
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
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
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
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
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.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
EDIT - installer has been updated.
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
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
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 Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
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.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
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: Clean Scripts.ini
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??
Nyn
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
Re: Clean Scripts.ini
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
~One