About the scripts' folder: I use this method:
JScript code:
function GetScriptFolder() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var ret = fso.GetFolder(MsgPlus.ScriptFilesPath + "\\..").Path;
fso = null; // Clean up
return ret;
}
Works for me..
EDIT::
Checking whether 'something' exists within an object:
JScript code:
var myObj = new Object();
myObj.someProperty = "Hello world!";
if("someProperty" in myObj) Debug.Trace("Exists!");
if("someOtherProperty" in myObj /* this is false; code won't be run */) Debug.Trace("Exists");