What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » headache: Special characters.

headache: Special characters.
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: headache: Special characters.
® 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;
}


This post was edited on 07-23-2007 at 02:16 PM by matty.
07-23-2007 01:44 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
headache: Special characters. - by runarius on 07-23-2007 at 10:29 AM
RE: headache: Special characters. - by davidpolitis on 07-23-2007 at 10:47 AM
RE: headache: Special characters. - by runarius on 07-23-2007 at 10:49 AM
RE: RE: headache: Special characters. - by davidpolitis on 07-23-2007 at 10:51 AM
RE: headache: Special characters. - by runarius on 07-23-2007 at 11:03 AM
RE: RE: headache: Special characters. - by davidpolitis on 07-23-2007 at 11:05 AM
RE: headache: Special characters. - by runarius on 07-23-2007 at 11:09 AM
RE: headache: Special characters. - by davidpolitis on 07-23-2007 at 11:10 AM
RE: headache: Special characters. - by runarius on 07-23-2007 at 11:11 AM
RE: headache: Special characters. - by davidpolitis on 07-23-2007 at 11:12 AM
RE: headache: Special characters. - by runarius on 07-23-2007 at 11:26 AM
RE: headache: Special characters. - by davidpolitis on 07-23-2007 at 11:42 AM
RE: headache: Special characters. - by Deco on 07-23-2007 at 01:40 PM
RE: headache: Special characters. - by matty on 07-23-2007 at 01:44 PM
RE: headache: Special characters. - by runarius on 07-23-2007 at 02:37 PM
RE: headache: Special characters. - by MeEtc on 07-23-2007 at 02:44 PM
RE: headache: Special characters. - by runarius on 07-23-2007 at 02:57 PM
RE: headache: Special characters. - by matty on 07-23-2007 at 03:56 PM
RE: headache: Special characters. - by runarius on 07-23-2007 at 04:18 PM
RE: headache: Special characters. - by Voldemort on 07-23-2007 at 04:21 PM
RE: headache: Special characters. - by matty on 07-23-2007 at 04:30 PM
RE: headache: Special characters. - by davidpolitis on 07-25-2007 at 06:33 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On