quote:
Originally posted by Mattike
I checked the code, but I seem to forgot to change this while changing the version numbers from the last beta (2.1.012) to the public version number (2.1.014).
Yeah, I said that in my original post..
quote:
Originally posted by Mattike
Maybe I should write some kind of macro to do this automatically everywhere I need to change the version number. Anyone knows how to do this in Notepad++? (that is: find and replace something in multiple files with a parameter you specify)
No, but perhaps you can use some XML thingy:
Create an XML (e.g. MsgPlus.ScriptFilesPath\ScriptInfo\Script.xml).
You should do something like this:
code:
<?xml version="1.0" encoding="Unicode"?> <!-- Save as Unicode in notepad -->
<PrefRanges>
<PrefRange Minimum="2.1.012" Maximum="2.1.014" />
</PrefRanges>
Now, you can get the ranges:
code:
function OnEvent_Initialize(MessengerStart) {
getScriptInfo(MsgPlus.ScriptFilesPath + "\\ScriptInfo\\Script.xml");
(additional code)
}
var PrefVersionRange;
function getScriptInfo(XMLFile) {
F = objDOM.load(XMLFile); // true if loaded, false if not loaded
if(F) {
D = objDOM.selectSingleNode("//PrefRange");
PrefRangeMin = D.getAttribute("Minimum");
PrefRangeMax = D.getAttribute("Maximum");
PrefVersionRange = [PrefRangeMin,PrefRangeMax];
return true;
} else {
Debug.Trace(objDOM.parseError.reason);
return "";
}
}
I use the DOM object to get script information and update the ScriptInfo.xml automatically (I always forget the ScriptInfo.xml :P )