Shoutbox

I'm new but starting to learn! HELP :) - 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: I'm new but starting to learn! HELP :) (/showthread.php?tid=87631)

I'm new but starting to learn! HELP :) by DirtJumper99 on 12-07-2008 at 04:57 PM

Hey I need someone to help me with a basic code, I know the general response is to find another script with similar code and edit it, but I'm literally starting today with script coding.

I am looking for a code similar to the ones for when a contact signs in, but I would like it so when I sign in, a toast comes up that tells me the current status of one or more contacts in my list that can be decided in the settings.

For example, in the settings I select to check the status of email@email.com when i sign in, so when i sign in next time a toast will come up saying:
"Hello, email@email.com is currently [status]" but maybe put their nickname instead of email, in the toast.

I'm not sure if this is easy or hard to do, so just let me know if it's possible and if you can help me?

I am slowly learning on my own though! :)
Thanks!

Matt

EDIT: Or if it is easier, a script to do the above, but only for one contact, so no need for a menu or ability to select multiple contacts.


RE: I'm new but starting to learn! HELP :) by matty on 12-07-2008 at 07:01 PM

jscript code:
var oStatus = {0 : 'Unknown', 1 : 'Offline', 3 : 'Online', 4 : 'Busy', 5 : 'Be right back', 6 : 'Idle', 7 : 'Away', 8 : 'In a call', 9 : 'Out to lunch'};

function OnEvent_SigninReady(sEmail) {
    MsgPlus.DisplayToast('email@email.com', oStatus[Messenger.MyContacts.GetContact('email@email.com').Status]);
}

RE: I'm new but starting to learn! HELP :) by DirtJumper99 on 12-07-2008 at 08:04 PM

Thanks Matty, I tried that code but nothing happened...
it just signed in normally with no messages or scripts appearing.. :S

EDIT: And yes I did insert the correct email

The error that comes up is this:
"Error: Object doesn't support this property or method (code: -2146827850)
       File: StatusCheck.js. Line: 4."

Heres my code:

jscript code:
var oStatus = {0 : 'Unknown', 1 : 'Offline', 3 : 'Online', 4 : 'Busy', 5 : 'Be right back', 6 : 'Idle', 7 : 'Away', 8 : 'In a call', 9 : 'Out to lunch'};

function OnEvent_SigninReady(sEmail) {
    MsgPlus.DisplayToast('email@email.co.uk', oStatus[Messenger.GetContact('email@email.co.uk').Status]);
}


Line 4 is: "MsgPlus.DisplayToast('email@email.co.uk', oStatus[Messenger.GetContact('email@email.co.uk').Status]);"
RE: I'm new but starting to learn! HELP :) by Matti on 12-07-2008 at 08:16 PM

It's Messenger.MyContacts.GetContact(... :)


RE: I'm new but starting to learn! HELP :) by DirtJumper99 on 12-07-2008 at 09:24 PM

Thanks a lot :P
Hopefully next time I wont have to ask for such simple scripts :D