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

Help:
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Help:
code:
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 filePath = MsgPlus.ScriptFilesPath + "\\myfile.txt";
var sLine = new ActiveXObject('Scripting.FileSystemObject').GetFile(filePath).OpenAsTextStream(1, -1).ReadLine();

var PlusWnd = MsgPlus.CreateWnd( 'windows_new.xml', 'Polite', 0 );
PlusWnd.SetControlText("EdtWelcomeMsg", sLine)
break;
}

}


Like that. But you don't need the brackets (show in red)

EDIT: Actually the syntax is wrong there... it needs to be the FileSystemObject where it says filePath and filePath should be passed as a paramater

This post was edited on 01-02-2007 at 05:48 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
01-02-2007 05:40 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help: - by Wakaki on 01-02-2007 at 01:57 PM
RE: Help: - by Spunky on 01-02-2007 at 03:30 PM
RE: Help: - by Wakaki on 01-02-2007 at 03:47 PM
RE: Help: - by Matti on 01-02-2007 at 04:06 PM
RE: RE: Help: - by Wakaki on 01-02-2007 at 05:25 PM
RE: Help: - by Spunky on 01-02-2007 at 05:40 PM
RE: Help: - by Wakaki on 01-02-2007 at 06:14 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