What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Question about "MyStatus"

Question about "MyStatus"
Author: Message:
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
34 / Male / Flag
Joined: Aug 2005
RE: Question about "MyStatus"
quote:
Originally posted by 5n4k3
I wrote this rather pointless script (just practicing) and it works, but there's something I wanted to ask if you could change.

Here's the Script:
function OnEvent_ChatWndCreated(ChatWnd)
{
    var Message = "Your current status is " + Messenger.MyStatus + "!";
    Message = MsgPlus.RemoveFormatCodes(Message);
    MsgPlus.DisplayToast("", Message)
}

I was wondering if you could make it say in the message your actual status (i.e. "busy" | "online" | "away" | etc) instead of using the numbers associated with each status.
Use a loop and a couple of arrays to replace the number?

javascript code:
function OnEvent_ChatWndCreated(ChatWnd)
{
    var Message = "Your current status is " + Messenger.MyStatus + "!";
    var number = new Array("2","3","4","5"....);
    var status = new Array("Appear Offline","Online","Busy","Be Right Back"....);
    for(var i = 0; i<number.length; i++){
        Message = Message.replace(number[i],status[i]);
    }
    Message = MsgPlus.RemoveFormatCodes(Message);
    MsgPlus.DisplayToast("", Message)
}

EDIT: Sorry, had a few errors, should work fine now... As for the second question, I'll answer shortly...

This post was edited on 01-17-2010 at 07:21 PM by stoshrocket.
formerly methos
01-17-2010 06:29 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Question about "MyStatus" - by 5n4k3 on 01-17-2010 at 06:01 PM
RE: Question about "MyStatus" - by stoshrocket on 01-17-2010 at 06:29 PM
RE: Question about "MyStatus" - by 5n4k3 on 01-17-2010 at 07:24 PM
RE: Question about "MyStatus" - by Matti on 01-17-2010 at 07:56 PM
RE: Question about "MyStatus" - by stoshrocket on 01-17-2010 at 08:10 PM
RE: Question about "MyStatus" - by 5n4k3 on 01-17-2010 at 08:24 PM
RE: Question about "MyStatus" - by CookieRevised on 01-17-2010 at 10:26 PM
RE: Question about "MyStatus" - by 5n4k3 on 01-19-2010 at 08:19 AM
RE: Question about "MyStatus" - by stoshrocket on 01-19-2010 at 02:55 PM
RE: Question about "MyStatus" - by matty on 01-19-2010 at 03:29 PM
RE: Question about "MyStatus" - by Matti on 01-19-2010 at 04:55 PM
RE: Question about "MyStatus" - by 5n4k3 on 01-19-2010 at 05:20 PM
RE: Question about "MyStatus" - by stoshrocket on 01-19-2010 at 07:52 PM
RE: Question about "MyStatus" - by CookieRevised on 01-19-2010 at 08:35 PM
RE: Question about "MyStatus" - by roflmao456 on 01-19-2010 at 10:58 PM
RE: Question about "MyStatus" - by CookieRevised on 01-19-2010 at 11:39 PM
RE: Question about "MyStatus" - by roflmao456 on 01-20-2010 at 02:47 AM
RE: Question about "MyStatus" - by 5n4k3 on 01-20-2010 at 11:20 AM
RE: Question about "MyStatus" - by Matti on 01-20-2010 at 12:27 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