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

Is there a script to.....?
Author: Message:
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Is there a script to.....?
code:
var now;
var signouttime;
function GetDate(){
var D = new Date();
var Hours = Addzero(D.getHours());
var Seconds = Addzero(D.getSeconds());
var Minutes = Addzero(D.getMinutes());
var Seconds = Addzero(D.getSeconds());

var Day = Addzero(D.getDate());
var Month = Addzero(D.getMonth() + 1);
var Year = Addzero(D.getYear());

now = Month+'/'+Day+'/'+Year+' - '+Hours+'/'+Minutes+'/'+Seconds;
//Debug.Trace(now);
}

function Addzero(va)
{
if (va<10)
  {va="0" + va}
  return va
}

function OnEvent_Timer(TimerId)
{
switch (TimerId){
case "Signout":
if (Messenger.MyStatus != 0) {
GetDate();
if(now == signouttime){
Messenger.Signout();
}
}
MsgPlus.AddTimer("Signout", 1000);
break;
}
}
MsgPlus.AddTimer("Signout", 1000);

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Message.substr(0,12) == "/signouttime"){
signouttime = Message.substr(13)
Debug.Trace(signouttime);
return "";
}
}

function OnGetScriptCommands()
{
var commands = "<ScriptCommands>"
commands += "  <Command>"
commands += "    <Name>signouttime</Name>"
commands += "    <Description>Signs you out on the specified time and date.</Description>"
commands += "    <Parameters>MM/DD/YYYY - HH/MM/SS;</Parameters>"
commands += "  </Command>"
commands += "</ScriptCommands>"
return commands
}

Just made that. Use /signouttime MM/DD/YYYY - HH/MM/SS with full values to define the date and time to sign out on [Image: xso_cheesy.gif].

This post was edited on 09-15-2006 at 12:40 PM by Felu.
09-15-2006 12:05 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Is there a script to.....? - by lu_benja on 09-13-2006 at 06:39 PM
RE: Is there a script to.....? - by Jesus on 09-13-2006 at 06:40 PM
RE: Is there a script to.....? - by lu_benja on 09-13-2006 at 06:43 PM
RE: Is there a script to.....? - by Jimbo on 09-13-2006 at 06:51 PM
RE: Is there a script to.....? - by vaccination on 09-13-2006 at 06:54 PM
RE: Is there a script to.....? - by lu_benja on 09-13-2006 at 06:56 PM
RE: Is there a script to.....? - by Ezra on 09-13-2006 at 06:57 PM
RE: RE: Is there a script to.....? - by vaccination on 09-13-2006 at 07:03 PM
RE: Is there a script to.....? - by Jesus on 09-13-2006 at 07:02 PM
RE: Is there a script to.....? - by Jesus on 09-13-2006 at 07:05 PM
RE: Is there a script to.....? - by lu_benja on 09-13-2006 at 07:11 PM
RE: Is there a script to.....? - by vaccination on 09-13-2006 at 07:12 PM
RE: Is there a script to.....? - by lu_benja on 09-14-2006 at 01:46 PM
RE: Is there a script to.....? - by crank on 09-15-2006 at 09:29 AM
RE: RE: Is there a script to.....? - by CookieRevised on 09-15-2006 at 11:18 AM
RE: Is there a script to.....? - by Felu on 09-15-2006 at 12:05 PM
RE: RE: Is there a script to.....? - by Jimbo on 09-15-2006 at 08:07 PM
RE: Is there a script to.....? - by Matti on 09-15-2006 at 12:38 PM
RE: Is there a script to.....? - by Felu on 09-15-2006 at 12:39 PM
RE: Is there a script to.....? - by Matti on 09-15-2006 at 12:44 PM
RE: Is there a script to.....? - by lu_benja on 09-15-2006 at 08:02 PM
RE: Is there a script to.....? - by CookieRevised on 09-15-2006 at 08:32 PM
RE: Is there a script to.....? - by Jimbo on 09-15-2006 at 08:34 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