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

Shutdown script help
Author: Message:
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: Shutdown script help
quote:
Originally posted by hello123456
I tried that first one, now wenever I try to send a message, it intercepts it and no message is being send.
So I removed it.
Without return, when i send a message, recieve message is activated, befor i actually recieve a message, and then when i recieve the message, it's being activated again.
I have just started scripting, so there still is enough to learn.
my bad... it should be:
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
if (Message.substring(0,9) == "/shutdown"){
new ActiveXObject("wscript.shell").run("shutdown.exe -s -f");
return "";
}else if (Message.substring(0,7) == "/reboot"){
new ActiveXObject("wscript.shell").run("shutdown.exe -r -f");
return "";
}
}

this way it will only return the empty string when either /reboot or /shutdown is parsed... You might want to look into your parsing method, for a good explanations on how to use /commands see :
cookies explanation on how to parse "/ " commands.


This post was edited on 05-24-2008 at 12:43 PM by foaly.
05-24-2008 12:36 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Shutdown script help - by hello123456 on 05-24-2008 at 11:49 AM
RE: Shutdown script help - by foaly on 05-24-2008 at 11:52 AM
RE: Shutdown script help - by hello123456 on 05-24-2008 at 12:28 PM
RE: Shutdown script help - by foaly on 05-24-2008 at 12:36 PM
RE: Shutdown script help - by hello123456 on 05-24-2008 at 12:41 PM
RE: Shutdown script help - by foaly on 05-24-2008 at 12:46 PM
RE: Shutdown script help - by hello123456 on 05-24-2008 at 12:53 PM
RE: Shutdown script help - by linx05 on 05-25-2008 at 08:25 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