botmaster
04-03-2007, 08:44 PM
SCAR Commenter v 1.0
This is a simple application designed to dynamically generate comment blocks in SCAR for all those too lazy to do it manually for themselves :D. Originally, I planned on scripting this in SCAR, but apparently SCAR's string functions can't handle the ammount of stress this script would place on it - I tried, and it compiled the SCAR script but SCAR crashed/hung up/killed itself after running it. For more info regarding the "script that crashes SCAR", refer to http://www.villavu.com/forum/showthread.php?t=7987.
So, I decided to port the entire script to VB - with success. At first I couldn't believe how similar VB and SCAR's functions were (well, after "remodelling" some of SCAR's string functions in VB). But in all, it took me less than 30 minutes to port the entire script. Just a matter of "find/replace".
Features:
You can dynamically create comment blocks after a predefined template
You can add your own custom terms of use to the script header
You can add a credits section after the script
Both of the above work by taking their info from files
You can specify wether or not you want to run the TOU/Credits through the commenting engine or just "add them" as is
Special "tags" - more explained below
The header/footer files that you can add can contain specific metadata tags that will be replaced with info taken from the script, for example <scriptname> inserts the name of the script. This can be useful if you want to reuse the files for different scripts but you don't want to edit them over and over. Valid tags to far are <scriptname> and <scriptauthor>. I might add more in later versions (date, time, version, something like that).
Known bugs:
Runtime error if you leave one of the fields blank. Workaround: put in a carriage return.
Runtime error if you specify a nonexistent file or check the option of adding credits/license and leave the file field blank
So far, only errors of the user (runtimes not caused by programatic logic)
I hope this script will be useful to you. If you want the source, please pm me.
EDIT: Nvm about the sources. I f*cked up while reformatting and lost it all. NOOOOO!!!
This is a simple application designed to dynamically generate comment blocks in SCAR for all those too lazy to do it manually for themselves :D. Originally, I planned on scripting this in SCAR, but apparently SCAR's string functions can't handle the ammount of stress this script would place on it - I tried, and it compiled the SCAR script but SCAR crashed/hung up/killed itself after running it. For more info regarding the "script that crashes SCAR", refer to http://www.villavu.com/forum/showthread.php?t=7987.
So, I decided to port the entire script to VB - with success. At first I couldn't believe how similar VB and SCAR's functions were (well, after "remodelling" some of SCAR's string functions in VB). But in all, it took me less than 30 minutes to port the entire script. Just a matter of "find/replace".
Features:
You can dynamically create comment blocks after a predefined template
You can add your own custom terms of use to the script header
You can add a credits section after the script
Both of the above work by taking their info from files
You can specify wether or not you want to run the TOU/Credits through the commenting engine or just "add them" as is
Special "tags" - more explained below
The header/footer files that you can add can contain specific metadata tags that will be replaced with info taken from the script, for example <scriptname> inserts the name of the script. This can be useful if you want to reuse the files for different scripts but you don't want to edit them over and over. Valid tags to far are <scriptname> and <scriptauthor>. I might add more in later versions (date, time, version, something like that).
Known bugs:
Runtime error if you leave one of the fields blank. Workaround: put in a carriage return.
Runtime error if you specify a nonexistent file or check the option of adding credits/license and leave the file field blank
So far, only errors of the user (runtimes not caused by programatic logic)
I hope this script will be useful to you. If you want the source, please pm me.
EDIT: Nvm about the sources. I f*cked up while reformatting and lost it all. NOOOOO!!!