MyStatusChange - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: MyStatusChange (/showthread.php?tid=78692)
MyStatusChange by Addenorw on 11-03-2007 at 02:30 PM
I have a little problem. And as you probably will see on my problem, I am a newbe.
I trid to fix so I get a message every time I change my status. This is what I wrote:
function OnEvent_MyStatusChange(Email)
{
if(Email == "andvibeto@msn.com") //Change for your sign-in email
{
var Message = "Your status have been chenged to " + Messenger.StatusChange + "!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("", Message);
}
}
The script debugging says everything is fine. Does anyone see what i do wrong?
RE: MyStatusChange by Mnjul on 11-03-2007 at 02:38 PM
quote: Originally posted by Addenorw
Messenger.StatusChange
There's no StatusChange property of the Messenger object. You probably want to use MyStatus property but it's a number and you have to convert it to string by yourself.
RE: MyStatusChange by Felu on 11-03-2007 at 02:44 PM
Err what are you doing?
OnEvent_MyStatusChange(
[enum] NewStatus
);
No email parameter .
code: function OnEvent_MyStatusChange(NewStatus){
if(Messenger.MyEmail == "andvibeto@msn.com"){
MsgPlus.DisplayToast("", "Your status have been changed to " + NewStatus + "!");
}
}
Or even better
code: function OnEvent_MyStatusChange(NewStatus){
if(Messenger.MyEmail == "andvibeto@msn.com"){
MsgPlus.DisplayToast("", "Your status have been changed to " + Array('', '', 'Appear Offline', 'Online', 'Busy', 'Be Right Back', 'Idle', 'Away', 'In a Call', 'Out to Lunch')[NewStatus] + "!");
}
}
Note: I haven't tested the code but they should work. Tested now and it works. Improved the code a bit aswell
RE: MyStatusChange by Spunky on 11-03-2007 at 02:45 PM
code: var Status = new Array("","","Appear Offline","Online","Busy","Be Right Back","Idle","Away","In a Call", "Out to Lunch");
function OnEvent_MyStatusChange(NewStatus){
MsgPlus.DisplayToast("New Status","Your status has been changed to "+Status[NewStatus]+"!";
}
That should do what you want and it should hopefully show you where you were going wrong
EDIT: Damn, beaten That might work better than mine too
RE: MyStatusChange by Matti on 11-03-2007 at 03:25 PM
Naah... Spunky's version is easier to understand. And there's no need to use RemoveFormatCodes.
RE: MyStatusChange by Felu on 11-03-2007 at 03:58 PM
quote: Originally posted by Mattike
Naah... Spunky's version is easier to understand. And there's no need to use RemoveFormatCodes.
I know, i just copy pasted that part from the first post, i was in a hurry at that time. But my version checks the email like in the first post the OP shows an intention. Fixed stuff now
RE: MyStatusChange by Addenorw on 11-03-2007 at 06:27 PM
thanks!
|