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

My first script.
Author: Message:
andrey
elite shoutboxer
****

Avatar

Posts: 795
Reputation: 48
– / Male / Flag
Joined: Aug 2004
RE: My first script.
just added a bit of layout to your script:
code:
function updateMessage() {
   FileSystem = new ActiveXObject("Scripting.FileSystemObject");
   file = FileSystem.OpenTextFile("E:/Documents/testfile.txt", 1);
   i = 0;
   lines = new Array();
   while(!file.AtEndOfStream) {
      line = file.ReadLine();
      if (line != '') {
         lines[i] = line;
      }
      i++;
   }
   file.Close();
   linenum = Math.floor(Math.random()*lines.length)-1;
   Messenger.MyPersonalMessage = lines[linenum];
}

function OnEvent_Initialize(MessengerExit) {
}

function OnEvent_Uninitialize(MessengerExit) {
}

function OnEvent_Signin(email) {
   if (email == Messenger.MyEmail) {
      updateMessage();
      MsgPlus.AddTimer('randomtext', 600000);
   }
}

function OnEvent_Timer(timerId) {
   if (timerId == 'randomtext') {
      updateMessage();
      MsgPlus.AddTimer('randomtext', 600000);
   }
}
[Image: w2kzw8qp-sq2_dz_b_xmas.png]
11-29-2006 06:58 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
My first script. - by devilz-fury on 11-29-2006 at 06:39 PM
RE: My first script. - by andrey on 11-29-2006 at 06:58 PM
RE: My first script. - by CookieRevised on 11-30-2006 at 01:45 AM
RE: My first script. - by Menthix on 11-30-2006 at 01:50 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