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

Pages: (2): « First [ 1 ] 2 » Last »
GetStatusChange
Author: Message:
Tobiaz
Full Member
***

Avatar

Posts: 103
Reputation: 5
67 / Male / –
Joined: Aug 2005
Status: Away
O.P. GetStatusChange
Hi!
So... there was no 'Code-Problem' on the board for a long time (i think), so I thought I could ask something! 8-|;)

Now, I wanted to do this freaky Text-to-Speech Plugin. My only Problem at the moment is, that I couldn't get the Friendlyname of this one, witch signed in!
I think for this you have to use this oMessenger thing (...), and I didn't work with it until yet.

So, how can I get the FriendlyName of the contact witch signed in!?

Thank you very much...


Greeeeez Tobiaz

This post was edited on 12-17-2005 at 10:39 AM by Tobiaz.
12-15-2005 04:21 PM
Profile E-Mail PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Get FriendlyName
what programming language are you using?
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
12-15-2005 04:25 PM
Profile E-Mail PM Web Find Quote Report
Tobiaz
Full Member
***

Avatar

Posts: 103
Reputation: 5
67 / Male / –
Joined: Aug 2005
Status: Away
O.P. RE: Get FriendlyName
Oh... I'm sorry for missing that :D

VB6...


Greeeeez
12-15-2005 04:26 PM
Profile E-Mail PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Get FriendlyName
something like:

code:
Dim oMessenger as object

Set oMessenger = oMessenger

MsgBox oMessenger.MySigninName
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
12-15-2005 04:31 PM
Profile E-Mail PM Web Find Quote Report
Tobiaz
Full Member
***

Avatar

Posts: 103
Reputation: 5
67 / Male / –
Joined: Aug 2005
Status: Away
O.P. RE: Get FriendlyName
Yeees... But so I get my own Friendlyname... is that right!?

I need the FN of the contact witch signs in.

I don't know how and I don't know where I have to use the code...



Thanks (@ Dempsey)

Greeeez Tobiaz
12-15-2005 04:37 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Get FriendlyName
Just use the Messenger object passed in parameters. The documentation of the Messenger API is part of the documentation given with the Plus! plugin API. In pesudo code it will be like:
IContact iContact = iMessenger.GetContact("contact@email.com");
string sContactName = iContact.getFriendlyName();
[Image: signature2.gif]
12-15-2005 06:48 PM
Profile PM Web Find Quote Report
Tobiaz
Full Member
***

Avatar

Posts: 103
Reputation: 5
67 / Male / –
Joined: Aug 2005
Status: Away
O.P. RE: Get FriendlyName
So, I have antoher little problem. Maybe that's a stupid question, but...

I have now this sub:

code:
Private Sub Form_Load()

Set objMessenger = New MessengerAPI.Messenger
Set Contacts = objMessenger.MyContacts


End Sub


Private Sub objMessenger_OnContactStatusChange(ByVal pMContact As Object, ByVal mStatus As MISTATUS)

If pMContact.Status = MISTATUS_ONLINE Then
    Status = "online"
ElseIf pMContact.Status = MISTATUS_BUSY Then
    Status = "Busy"
ElseIf pMContact.Status = MISTATUS_AWAY Then
    Status = "away"
ElseIf pMContact.Status = MISTATUS_BE_RIGHT_BACK Then
    Status = "brb"
ElseIf pMContact.Status = MISTATUS_ON_THE_PHONE Then
    Status = "onphone"
ElseIf pMContact.Status = MISTATUS_OUT_TO_LUNCH Then
    Status = "lunch"
ElseIf pMContact.Status = MISTATUS_OFFLINE Then
    Status = "offline"
End If


   
End Sub


But  how the hell can I call it!? Should it be called automatically!?
I don't get it...

Thanks for helping



Greeeeeeez Tobiaz
12-17-2005 10:38 AM
Profile E-Mail PM Find Quote Report
Millenium_edition
Veteran Member
*****

Avatar

Posts: 1787
Reputation: 57
Joined: Apr 2003
RE: GetStatusChange
quote:
Originally posted by Tobiaz
But  how the hell can I call it!? Should it be called automatically!?
if a contact changes his/her status, it gets called, and all it does is assigning a value to an undeclared variable at this moment.
adding something along the lines of
code:
MsgBox Status
should give a result
12-17-2005 10:41 AM
Profile E-Mail PM Find Quote Report
Tobiaz
Full Member
***

Avatar

Posts: 103
Reputation: 5
67 / Male / –
Joined: Aug 2005
Status: Away
O.P. RE: GetStatusChange
Coool. Thank you! It works perfect. I made it now with Toasts...
Only one problem:
If i sign in, there appers many Toast: One for every contact. Even if he is offline, the plugin let me know this... Do you know what i mean!?
If i sing in, theres a toast for every contact with his actual status...

How can I prevent this!?

thank you


Greeeez Tobiaz
12-17-2005 11:50 AM
Profile E-Mail PM Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: GetStatusChange
i dont know vb6 but if you removed
code:
ElseIf pMContact.Status = MISTATUS_OFFLINE Then
    Status = "offline"
then it wouldnt notify you the offline contacts *-)
[Image: sig.png]
12-17-2005 12:00 PM
Profile PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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