® is the registered trademark character it isn't a Plus! Character used for formatting.
People if you don't know what you are talking about don't post as you are only going to confuse things.
What is the error message in the debug window?
Can you post the exact name of the contact from the Contact Information Window (in a conversation type /info or from the Contact List right click the contact choose Messenger Plus! Extras > Contact Information)
My code works without a problem
code:
function OnEvent_Initialize(MessengerStart){
//loop through the contacts
for (var e = new Enumerator(Messenger.MyContacts); !e.atEnd(); e.moveNext()){
// write the contacts name to the file test.txt in the scripts path
AddLineToFile ('test.txt', e.item().Name);
}
}
function AddLineToFile (file, line) {
// declare fsObj has FilesystemObject
var fsObj = new ActiveXObject('Scripting.FileSystemObject');
//check if the file exists already
var fileexists = fsObj.FileExists(MsgPlus.ScriptFilesPath + '\\' + file);
//open the file
var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, (fileexists ? 8 : 1), true, (-1) /* UNICODE */);
//try to write the name to the file
try { fileObj.WriteLine(line); }
catch (err) {
//Oops we have an error lets output the name and the error
Debug.Trace(line);
Debug.Trace(err.description);
}
//close the file
fileObj.Close();
//unset the fsObj
fsObj = null;
}