What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Little help with a code??? -> ANOTHER HELP

Little help with a code??? -> ANOTHER HELP
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Little help with a code??? -> ANOTHER HELP
That is because you are storing tyme as a local variable rather than a global one and you are not parsing it to the other function.  Try this code instead....

code:
function OnGetScriptCommands(){
var ScriptCommands = "<ScriptCommands>";
ScriptCommands    +=     "<Command>";
ScriptCommands    +=         "<Name>sleep</Name>";
ScriptCommands    +=         "<Description>Tempo para a contagem</Description>";
ScriptCommands    +=   "<Parameters>&lt;Tempo em minutos&gt;</Parameters>";
ScriptCommands    +=     "</Command>";
ScriptCommands    += "</ScriptCommands>";

return ScriptCommands;
}

function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if (Message.substr(0, 7) == "/sleep "){
var tyme = Message.substr(Message.search(' ')*60000);
sleeptime(tyme);
return "";
}
}

function sleeptime(tyme)
{
MsgPlus.AddTimer("Statuz", tyme);
MsgPlus.DisplayToast("Status Changer", "Timer iniciado: "+tyme+" milisegundos para Offline");
}

function OnEvent_Timer(timerID)
{
if(timerID == "Statuz")
{
Messenger.MyStatus = 2;
}
}
[Image: markee.png]
03-19-2007 11:09 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Little help with a code??? -> ANOTHER HELP - by MicroWay on 03-19-2007 at 02:29 AM
RE: Little help with a code??? - by deAd on 03-19-2007 at 02:32 AM
RE: Little help with a code??? - by MicroWay on 03-19-2007 at 02:48 AM
RE: Little help with a code??? -> ANOTHER HELP - by MicroWay on 03-19-2007 at 10:37 PM
RE: RE: Little help with a code??? -> ANOTHER HELP - by markee on 03-19-2007 at 10:41 PM
RE: Little help with a code??? -> ANOTHER HELP - by MicroWay on 03-19-2007 at 10:45 PM
RE: Little help with a code??? -> ANOTHER HELP - by markee on 03-19-2007 at 11:09 PM
RE: Little help with a code??? -> ANOTHER HELP - by TheGuruSupremacy on 03-19-2007 at 11:34 PM
RE: Little help with a code??? -> ANOTHER HELP - by MicroWay on 03-20-2007 at 12:17 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