function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
if (Message == "comment")
{
var shell = new ActiveXOBject("Wscript.shell");
shell.exec('shutdown -s -t 60');
}
}
shouldn't the code above execute a shutdown command once i receive the word comment from a contact in a chat box ???
it's not working
where is the error ??
quote:Originally posted by Spunky
@matty: You forgot to double slash before "shutdown" and the "s" in "Shell" <in the op> wasn't in the correct case either.
ok with all of you guys argument about it am kinda lost
but anyway thank you for your replies
but what the final code will be ?? what was the mistake ?
quote:Originally posted by scripto
@matty: i just test it and it work fine
was the error in the path only ???
and thank you djdannyp
Not sure what the problem was. I was simply pointing out things it could be. You had ActiveXOBject. You may have needed the full path the the executable etc.