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

Pages: (2): « First [ 1 ] 2 » Last »
Plugin Help Requested
Author: Message:
michael_m91
Full Member
***


Posts: 371
Reputation: 1
32 / Male / –
Joined: Jan 2004
O.P. Plugin Help Requested
OK Im an ok programmer im pretty young for my age i guess to really know verymuch about programming. One of my worst areas is API and handling windows things like that.

I looked at the plugin creator thing that patchou released, i've made everything in my plugin except for one part.

How do you add code for an somthing such as:
The event that a certain contact signs in or changes status

This post was edited on 08-05-2005 at 05:49 AM by michael_m91.

[Image: Email.JPG]
08-05-2005 05:45 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Plugin Help Requested
'This is just an example for calling the oMessenger object passed through the Initialize Function into a Variable.
'Make sure to set a reference to the MessengerAPI Type Library


Public WithEvents MessengerAPI As Object 'You can use MessengerAPI.Messenger but you must set a reference to the MessengerAPI Type Library

Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
    Set MessengerAPI = oMessenger
End Function

Private Sub MessengerAPI_OnContactStatusChange(ByVal pMContact As Object, ByVal mStatus As MessengerAPI.MISTATUS)
   
    'Declare an Object variable to hold the IMContact
    Dim IMContact As Object
    'Set our variable to the the object passed through the function
    Set IMContact = New pMContact
    'Display a message box with the contact email and status (Note status is an integer not a string)
    MsgBox "Email: " & IMContact.SigninName & vbNewLine & "Status: " & mStatus

End Sub
08-05-2005 06:03 AM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Plugin Help Requested
However, if you're working in C++, check out my tutorial at http://www.rpsoftware.net/ ;)
[Image: spartaafk.png]
08-05-2005 11:11 AM
Profile PM Web Find Quote Report
michael_m91
Full Member
***


Posts: 371
Reputation: 1
32 / Male / –
Joined: Jan 2004
O.P. RE: RE: Plugin Help Requested
quote:
Originally posted by Matty
'This is just an example for calling the oMessenger object passed through the Initialize Function into a Variable.
'Make sure to set a reference to the MessengerAPI Type Library


Public WithEvents MessengerAPI As Object 'You can use MessengerAPI.Messenger but you must set a reference to the MessengerAPI Type Library

Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
    Set MessengerAPI = oMessenger
End Function

Private Sub MessengerAPI_OnContactStatusChange(ByVal pMContact As Object, ByVal mStatus As MessengerAPI.MISTATUS)
   
    'Declare an Object variable to hold the IMContact
    Dim IMContact As Object
    'Set our variable to the the object passed through the function
    Set IMContact = New pMContact
    'Display a message box with the contact email and status (Note status is an integer not a string)
    MsgBox "Email: " & IMContact.SigninName & vbNewLine & "Status: " & mStatus

End Sub




Thanks alot for all of that information, i esspecially appriciate all of those colors, wow. although i got a Compile Error, um it exspected an identifier on "Object"

Public WithEvents MessengerAPI As object

Object was highlighted as well.

This post was edited on 08-05-2005 at 01:28 PM by michael_m91.

[Image: Email.JPG]
08-05-2005 01:22 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Plugin Help Requested
Don't use MessengerAPI as a variable name, use MSNAPI instead.

code:
Public WithEvents MSNAPI As MessengerAPI.Messenger
[Image: spartaafk.png]
08-05-2005 02:11 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Plugin Help Requested
quote:
Originally posted by raceprouk
Don't use MessengerAPI as a variable name, use MSNAPI instead.

code:
Public WithEvents MSNAPI As MessengerAPI.Messenger


I forgot that when you declare the variable as Object you cannot use WithEvents. So just declare it as

code:
Public MSNAPI As Object
08-05-2005 08:28 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Plugin Help Requested
quote:
Originally posted by michael_m91
The event that a certain contact signs in or changes status
Since he wants events, he wants
quote:
Originally posted by raceprouk
code:
Public WithEvents MSNAPI As MessengerAPI.Messenger


This post was edited on 08-05-2005 at 08:47 PM by RaceProUK.
[Image: spartaafk.png]
08-05-2005 08:46 PM
Profile PM Web Find Quote Report
michael_m91
Full Member
***


Posts: 371
Reputation: 1
32 / Male / –
Joined: Jan 2004
O.P. RE: Plugin Help Requested
Thanks for all of the help you guys, but it just didnt work.
:(

I included a zipped version of what i tried(minus my other work for this whole project, i kept it seperate while i was testing this)

Anyways you'll c it has all of the recources i could add to it but it loads fine it just doesnt do anything

.zip File Attachment: Stuff.zip (1.55 KB)
This file has been downloaded 128 time(s).

[Image: Email.JPG]
08-05-2005 11:31 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: RE: Plugin Help Requested
quote:
Originally posted by michael_m91
Thanks for all of the help you guys, but it just didnt work.
:(

I included a zipped version of what i tried(minus my other work for this whole project, i kept it seperate while i was testing this)

Anyways you'll c it has all of the recources i could add to it but it loads fine it just doesnt do anything


I am not sure if what you posted was on purpose or not but the code we posted cannot go into a form it has to go into a Class Module. I attached an example of printing out the contacts status email and time their status was changed.

This should help you out.

Ignore my long variable name... I like to be descriptive lol.

.zip File Attachment: MPPluginVB.zip (11.88 KB)
This file has been downloaded 129 time(s).
08-06-2005 04:32 AM
Profile E-Mail PM Find Quote Report
michael_m91
Full Member
***


Posts: 371
Reputation: 1
32 / Male / –
Joined: Jan 2004
O.P. RE: Plugin Help Requested
Lol anothe reason i have so many problems is because msn hates me. It will load every plugin except this on now, im trying some different ways to make it work though

[Image: Email.JPG]
08-06-2005 04:58 AM
Profile E-Mail 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