Skip to content
Snippets Groups Projects

This is a menu-driven configuration program/script for SlyEdit.

Merged Eric Oulashin requested to merge slyedit_configurator_script into master
1 unresolved thread
+ 1
36
@@ -675,56 +675,21 @@ function genFullPathCfgFilename(pFilename, pDefaultPath)
// Return value: An object with the following properties:
// cfgFilename: The full path & filename of the SlyEdit configuration file that was read
// cfgSections: A dictionary of the INI sections (BEHAVIOR, ICE_COLORS, DCT_COLORS)
// wholeFile: An array of the whole file // TODO: Is this needed?
function readSlyEditCfgFile()
{
var retObj = {
cfgFilename: genFullPathCfgFilename(gSlyEdCfgFileName, gStartupPath),
cfgSections: {},
wholeFile: []
cfgSections: {}
};
write("\r\n");
var cfgFile = new File(retObj.cfgFilename);
if (cfgFile.open("r"))
{
//var objs = cfgFile.iniGetAllObjects();
retObj.wholeFile = cfgFile.iniReadAll(); // For comments.. can we preserve comments?
var iniSectionNames = cfgFile.iniGetSections();
for (var i = 0; i < iniSectionNames.length; ++i)
retObj.cfgSections[iniSectionNames[i]] = cfgFile.iniGetObject(iniSectionNames[i]);
cfgFile.close();
/*
objs:
0: [object Object] (object)
name: BEHAVIOR
displayEndInfoScreen: true
userInputTimeout: true
inputTimeoutMS: 300000
reWrapQuoteLines: true
allowColorSelection: true
saveColorsAsANSI: false
allowCrossPosting: true
enableTextReplacements: regex
tagLineFilename: SlyEdit_Taglines.txt
taglinePrefix: ...
quoteTaglines: false
shuffleTaglines: true
allowUserSettings: true
useQuoteLineInitials: true
indentQuoteLinesWithInitials: true
enableTaglines: false
allowEditQuoteLines: true
allowSpellCheck: true
dictionaryFilenames: en,en-US-supplemental
1: [object Object] (object)
name: ICE_COLORS
menuOptClassicColors: false
ThemeFilename: SlyIceColors_BlueIce-Modified.cfg
2: [object Object] (object)
name: DCT_COLORS
ThemeFilename: SlyDCTColors_Default-Modified.cfg
*/
}
// In case some settings weren't loaded, add defaults
if (!retObj.cfgSections.hasOwnProperty("BEHAVIOR"))
Loading