What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Messenger API

Messenger API
Author: Message:
_BassReFLeX_
Junior Member
**

Avatar

Posts: 56
– / Male / –
Joined: Dec 2003
O.P. Messenger API
Hi. Can anyone help me. How do I detect if user is signed in msn. I've tried :: CODE ::  If messenger.signout = true then ::CODE:: but it isn't working. It shouldn't in fact :P. If anyone could help me, I would apprecciate a lot !

Thnx !!
:)
05-04-2004 03:17 PM
Profile E-Mail PM Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
20 / Other / Flag
Joined: Jul 2003
RE: Messenger API
you would need to be connected using the protocal, i dont think it is possible with simple api calls :s
05-04-2004 03:35 PM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Messenger API
Wouldn't it be possible to use the IMessenger(C++)/OMessenger(VB) object that Plus! exposes to do that?
[Image: spartaafk.png]
05-04-2004 10:12 PM
Profile PM Web Find Quote Report
dotNorma
Veteran Member
*****

Avatar

Posts: 1745
Reputation: 17
32 / Male / –
Joined: May 2003
RE: Messenger API
You can try it this way , this doesn't require you to use Messenger Plus! to do it.

1. Make sure you have set the following references :

Messenger API Type Library

2. Make sure you have added the following to your code.

Public WithEvents ________ As Messenger
Where the blank is , put your own variable (I use MSN)

3. Make sure in Form_Load() You have....

Set ______ As Messenger
In the blank you should put the same variable as above.

4. You can do

If ____ .MyStatus = MISTATUS_OFFLINE Then
*Something*
Else
*Something*
End If


So if they are offline (not connected) it will do something , if they are any other status (online/away/busy/ext) they have to be connected :)

If you ever need any help in Visual Basics feel free to Private Message me. :-)


This post was edited on 05-05-2004 at 02:37 AM by dotNorma.
05-04-2004 10:48 PM
Profile PM Web Find Quote Report
jokinau
New Member
*

Avatar

Posts: 3
44 / Male / –
Joined: May 2004
Undecided  RE: Messenger API
NoName, amazing, REALLY!! didn't know that! :D

But anyway, if I really understood what _BassReFLeX_ meant, you determine whether _BassReFLeX_ is online, and I guess he/she wants to know whether his/her contacts are online!

Is that right _BassReFLeX_?? :$ And if it is not, how could we do that, NoName?

TIA(Y)
05-05-2004 01:49 PM
Profile PM Web Find Quote Report
_BassReFLeX_
Junior Member
**

Avatar

Posts: 56
– / Male / –
Joined: Dec 2003
O.P. RE: Messenger API
What I want: When my app starts (it doesnt have to do with MsgPlus! or any .dll or any plugin. it's simple .exe) i want it to check if anyone is signed in to messengers so it could continue it's job (because it has to do with msn ) if not then, nothing can be done since my app has to do only with msn.

to: NoName :: THanks for that information. Haven't tried that yet. I knew about MISTATUS_INVISIBLE but i wanted it " MISTATUS_SIGNEDIN :P ... you know what i mean. However, i'll get back to work. thnx guys
:)
05-05-2004 03:07 PM
Profile E-Mail PM Find Quote Report
Sk3tch
Veteran Member
*****

Avatar
We are Samurai, the keyboard cowboys

Posts: 1675
Reputation: 4
38 / Male / –
Joined: Jul 2003
RE: Messenger API
MISTATUS_INVISIBLE and MISTATUS_OFFLINE are different, Offline as NoName said is if they are offline (not connected) and Invisible is your messenger status as offline wether your setting or viewing it.
So you could use MISTATUS_OFFLINE like the example NoName gave to detect weather you are connected which you could then see if you messenger is running.
Sk3tch@Microsoft.com - Email
- 53 6B 33 74 63 68 34 64@hotmail.com - Messenger
05-05-2004 03:21 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Messenger API
If you want to check the online/offline status of your contacts, there is the MyContacts property made available by the Messenger object. MSN Fanatic has some useful information you can use.

The page is quite easy to follow. Basically, if you want to look at the status of your contacts, the page I've linked to above almost does it all for you. In other words, the following loop can be used:
code:
For index = 0 To <contact-list-object>.Count
    <contact-object> = <contact-list-object>.Item(index)
    'Do what you need to here
Next index
Just replace <contact-list-object> with the IMessengerContacts variable, and <contact-object> with the name of your IMessengerContact variable (which should both be declared before the loop). The variable index should be declared an Integer for efficiency.

Hope this helps.

This post was edited on 05-05-2004 at 03:45 PM by RaceProUK.
[Image: spartaafk.png]
05-05-2004 03:44 PM
Profile PM Web Find Quote Report
dotNorma
Veteran Member
*****

Avatar

Posts: 1745
Reputation: 17
32 / Male / –
Joined: May 2003
RE: Messenger API
quote:
Originally posted by _BassReFLeX_
to: NoName :: THanks for that information. Haven't tried that yet. I knew about MISTATUS_INVISIBLE but i wanted it " MISTATUS_SIGNEDIN ... you know what i mean. However, i'll get back to work. thnx guys

Hey , but MISTATUS_OFFLINE means that the user is not connected to MSN Messenger. So you say if they are not connect to MSN Messenger do nothing else (Because else they have to be connected right?) do the stuff :)

The code I said earlier should work fine.
05-05-2004 11:27 PM
Profile PM Web Find Quote Report
_BassReFLeX_
Junior Member
**

Avatar

Posts: 56
– / Male / –
Joined: Dec 2003
O.P. RE: Messenger API
oh thanks guys. Btw i forgot to tell that i've just solved the problem with MISTATUS_OFFLINE .. thanks a lot however..
:)
05-07-2004 07:15 PM
Profile E-Mail PM 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