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

Script query
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Script query
quote:
Originally posted by djdannyp
Edit: The statuses show in the list box at the moment as numbers (relating to the number item they are in the listbox......however they kinda need to be parsed as 'STATUS_ONLINE', etc.....how can I accomplish this?  Also how can I get them to show in the listbox as their item name, rather than number

js code:
var status = new Array("Unknown", "Offline", "", "Online", "Busy", "BRB", "Idle", "Away", "In A Call", "Out to Lunch"); // I think I got them in the right order

Debug.Trace(status[Contact.Status]); // Obviously, you have to enumerate contacts to get the status...

EDIT:

We make an array called "status" and populate it with the values. As an array is 0-based, The first item (at index 0) is "Unknown". If you look in the scripting docs, the number to represent "Unknown" is also 0, which is why we placed it first. 1 Represents "Offline" and so on... 3 is blank as it is not used in this situation.

So when we Trace the status, we pass the Contact.Status similar to a parameter in a function. If the contact status is 6 (Idle), it would be the same as:

js code:
Debug.Trace(status[6]); //Which would trace "Idle"


This post was edited on 01-21-2009 at 06:38 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
01-21-2009 06:01 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Script query - by djdannyp on 01-21-2009 at 02:25 PM
RE: Script query - by matty on 01-21-2009 at 03:24 PM
RE: Script query - by djdannyp on 01-21-2009 at 04:48 PM
RE: Script query - by Spunky on 01-21-2009 at 06:01 PM
RE: Script query - by djdannyp on 01-21-2009 at 06:24 PM
RE: Script query - by matty on 01-21-2009 at 06:24 PM
RE: RE: Script query - by djdannyp on 01-21-2009 at 06:42 PM
RE: Script query - by Spunky on 01-21-2009 at 06:39 PM
RE: Script query - by matty on 01-21-2009 at 07:49 PM
RE: Script query - by djdannyp on 01-21-2009 at 08:10 PM
RE: Script query - by Spunky on 01-21-2009 at 08:28 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