What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » why my scripts can not work?

why my scripts can not work?
Author: Message:
Hijhon
New Member
*


Posts: 3
Joined: Aug 2006
O.P. Huh?  why my scripts can not work?
quote:
var txtFilepath;
var refreshtime;

function OnEvent_Initialize(MessengerStart)           //开始登陆后执行
{
    txtFilepath = MsgPlus.ScriptFilesPath + "\\" + "song.txt";
    refreshtime = 2000;
    loadtext();
    OnEvent_Timer(ChangeTime);
}


function OnEvent_Timer(TimerId){                      //时间触发器
if(TimerId == "ChangeTimer") {
         Messenger.MyPersonalMessage = txtline[i];
        MsgPlus.AddTimer("ChangeTimer", refreshtime);
        A++;
        if (A==i)
        {
            loadtext()
        }
}
}

function OnEvent_Uninitialize(MessengerExit)
{
   // 清理内存
   Shell = null;
   FileSystem = null;
   Settings = [];
}

function loadtext()  //读取文本内容
{
    var shell
    var filesystem
    var txtfile
    var txtline
    var i = 0;
    var error = false;
    Shell = new ActiveXObject("WScript.Shell");
    FSO = new ActiveXObject("Scripting.FileSystemObject");
    txtFile = FSO.OpenTextFile(Settings['txtFilepath']);
    if(!error) {
        do {
            txtline[i] = txtfile.ReadLine();
            i++;
        }while(!error);
        NameFile.Close();
    }

}
08-17-2006 01:23 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
why my scripts can not work? - by Hijhon on 08-17-2006 at 01:23 PM
RE: why my scripts can not work? - by ShawnZ on 08-17-2006 at 01:25 PM
RE: why my scripts can not work? - by markee on 08-17-2006 at 01:30 PM
RE: why my scripts can not work? - by Hijhon on 08-17-2006 at 01:32 PM
RE: why my scripts can not work? - by Matti on 08-17-2006 at 03:49 PM
RE: why my scripts can not work? - by Hijhon on 08-18-2006 at 04:26 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