What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » help (debug this script - syntax error)

help (debug this script - syntax error)
Author: Message:
Wakaki
Junior Member
**

Avatar

Posts: 30
31 / Male / –
Joined: Jan 2007
O.P. help (debug this script - syntax error)
this is my script:
code:
//global variables:   
        var fsObj = new ActiveXObject("Scripting.FileSystemObject");
        var fileObj = fsObj.OpenTextFile(MsgPlus.ScriptFilesPath + '\\defwelcomemsg.txt', 1);
        var DefWelcomemsg = fileObj.ReadAll();
        fileObj.Close();
       
        var fsObj2 = new ActiveXObject("Scripting.FileSystemObject");
        var fileObj2 = fsObj2.OpenTextFile(MsgPlus.ScriptFilesPath + '\\defgoodbyemsg.txt', 1);
        var DefGoodbyemsg = fileObj2.ReadAll();
        fileObj2.Close();
       

//functions
function OnEvent_Initialize(MessengerStart)
{

}

function OnGetScriptMenu(Location)
{
    var ScriptMenu ="<ScriptMenu>";
    ScriptMenu +="<MenuEntry Id=\"window\">Polite Preferences</MenuEntry>";
    ScriptMenu +="</ScriptMenu>";
    return ScriptMenu;
}

function OnEvent_MenuClicked(MenuId, Location, Wnd)
{
    switch(MenuId)
    {
        case "window":
       
        var PlusWnd = MsgPlus.CreateWnd( 'windows_new.xml', 'Polite', 0 );
        PlusWnd.SetControlText("EdtWelcomeMsg", DefWelcomemsg)
        PlusWnd.SetControlText("EdtGoodbyeMsg", DefGoodbyemsg)
       
        break;
    }
       
}



function OverwriteFile (file, content)
{
        var fileObj4 = new ActiveXObject("Scripting.FileSystemObject").OpenTextFile(MsgPlus.ScriptFilesPath + '\\' + file, 2, 0);
        fileObj4.Write(content);
        fileObj4.Close();
}

function OnWindowidEvent_CtrlClicked(PlusWnd, CtrlId) {
if(CtrlId == "BtnSave") {
OverwriteFile("defwelcomemsg.txt", PlusWnd.GetControlText("EdtWelcomeMSg");
OverwriteFile("defgoodbyemsg.txt", PlusWnd.GetControlText("EdtGoodbyeMsg");
}
}


function OnEvent_Signin(Email)
{
     var Message = DefWelcomemsg;
     MsgPlus.DisplayToast("Hello", Message);

}
function OnEvent_Signout(Email)
{
    var Message = DefGoodbyemsg;
     MsgPlus.DisplayToast("Goodbye", Message);
}


function OnEvent_Uninitialize(MessengerExit)
{
}



it doesnt work in the debugging screen it says that in line 53 ')' was expected
line 53 is (almost) the same as line 54
so i think the error is in both

line 53 and 54:
code:
OverwriteFile("defwelcomemsg.txt", PlusWnd.GetControlText("EdtWelcomeMSg");
OverwriteFile("defgoodbyemsg.txt", PlusWnd.GetControlText("EdtGoodbyeMsg");


This post was edited on 01-04-2007 at 06:34 PM by WDZ.
[Image: wakakipt2.png]
01-04-2007 02:56 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
help (debug this script - syntax error) - by Wakaki on 01-04-2007 at 02:56 PM
RE: help - by ins4ne on 01-04-2007 at 03:02 PM
RE: help - by pollolibredegrasa on 01-04-2007 at 03:03 PM
RE: help - by Wakaki on 01-04-2007 at 03:26 PM
RE: help - by Spunky on 01-04-2007 at 04:03 PM
RE: help - by Wakaki on 01-04-2007 at 04:56 PM
RE: help - by Spunky on 01-04-2007 at 05:16 PM
RE: help (debug this script - syntax error) - by Wakaki on 01-06-2007 at 10:21 AM
RE: help (debug this script - syntax error) - by NanaFreak on 01-06-2007 at 10:23 AM
RE: help (debug this script - syntax error) - by Wakaki on 01-06-2007 at 02:40 PM
RE: help (debug this script - syntax error) - by Matti on 01-06-2007 at 05:19 PM


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