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

Check for contact...
Author: Message:
mad_willsy
Junior Member
**


Posts: 21
33 / Male / Flag
Joined: Jan 2007
O.P. Check for contact...
Can I have a simple script to determine if the user no-spam@hotmail.co.uk is online and if it is give an auto-message "Try my other address (no-spam@hotmail.co.uk)" because I use one when not at my computer and another when I am?

I don't want auto-sign in because I use sharing folders as a my documents folder between my two msn addresses for home and at dads for coursework etc...

If not, could I just have the if to determine if my other address is online please?

Ta.
Backthebulls.com - Free online games
Upload your own stuff - free!
04-19-2007 09:53 PM
Profile PM Web Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: Check for contact...
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd){
var e = new Enumerator(Messenger.MyContacts);
for(; !e.atEnd(); e.moveNext()){
var Contact = e.item();
if(Contact.Email == "no-spam@hotmail.co.uk" && Contact.Status != 1){
ChatWnd.SendMessage("Try my other address (no-spam@hotmail.co.uk)");
}
}
}
[quote]
Ultimatess6
: What a noob mod
04-21-2007 04:52 AM
Profile PM Web Find Quote Report
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: Check for contact...
This script will also auto-message if no-spam@hotmail.co.uk's status is set to something like Busy or Out To Lunch (I also think it's simpler):
code:
var Email = "no-spam@hotmail.co.uk";
var Message = "Try my other address (no-spam@hotmail.co.uk)";

function OnEvent_ChatWndReceiveMessage(ChatWnd) {
   var Contact = Messenger.MyContacts.GetContact(Email);
   if(Contact != null && Contact.Status > 2) ChatWnd.SendMessage(Message);
}
Change the email and message to suit your needs.
04-21-2007 06:39 AM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Check for contact...
And phalanxii's code has the advantage that it doesn't loop through the contacts but simply uses the GetContact() function, which is more recommended. ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
04-21-2007 08:22 AM
Profile E-Mail PM Web Find Quote Report
mad_willsy
Junior Member
**


Posts: 21
33 / Male / Flag
Joined: Jan 2007
O.P. RE: Check for contact...
How could I make it only say to try other account it if the user logged on on the computer is set to idle AND no-spam@hotmail.co.uk is online?

Also can i have a list of what numbers represen what status?
Backthebulls.com - Free online games
Upload your own stuff - free!
04-24-2007 05:06 PM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Check for contact...
quote:
Originally posted by mad_willsy
How could I make it only say to try other account it if the user logged on on the computer is set to idle AND no-spam@hotmail.co.uk is online?
Could you explain that a bit better, using commas and correct spelling? :)
quote:
Originally posted by mad_willsy
Also can i have a list of what numbers represen what status?
Sure, just look in the scripting documentation:
quote:
Originally posted by Patchou in Plus! Live Scripting Documentation - Contact::Status
A number taken from the following enumeration:
code:
1 - Offline
3 - Online
4 - Busy
5 - Be Right Back
6 - Idle
7 - Away
8 - In a Call
9 - Out to Lunch
If Messenger Plus! fails to get the contact's status for any reason, the return value is:
code:
0 - Unknown

When you're setting you're own status with Messenger::MyStatus, you can't use 1 (Offline). Instead there is option 2 (Appear Offline). ;)

This post was edited on 04-24-2007 at 07:08 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
04-24-2007 07:07 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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