Shoutbox

oMessenger in Plus! API - 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)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: oMessenger in Plus! API (/showthread.php?tid=37520)

oMessenger in Plus! API by (CyBeRDuDe) on 01-26-2005 at 10:40 PM

Hey everybody.. could anybody give me some help with the oMessenger in Plus! API?

I can't seem to get it working, no matter what I do... I keeps erroring "User-defined type not defined"...
Am I right that using oMessenger would prevent Windows Messenger in running in background? right?....

What declares do I need to make in the class?...

code:
Public WithEvents objMessenger As oMessenger
or
code:
Public WithEvents objMessenger As MessengerAPI.Messenger

neither works!?

in the Initialize:

code:
objMessenger = New oMessenger

shouldn't this be enough?... what am I doing wrong?... I really can't seem to locate the problem...
Could anybody maybe post/upload an example plugin using the oMessenger?.... :D...

And another one:
At the moment i'm not using the oMessenger(beacuse I can't get it working)... But using the normal Messenger API... whenever I try any of these codes MSN crashes, no errors or anything.. just crashes...
code:
Set MsgrGroups = objMessenger.MyGroups
Set MsgrContacts = MsgrGroup.Contacts
It only does it when I'm using anything with the Groups or Contacts... GetContact works fine.... I can get them working perfectly in a seperate exe, but in a plugin it just crashses... I was just wondering if it is just me?.. or does anybody else also have this problem? does anybody know why? and is there a workaround this (Besides doing it in a seperate exe)? I want to get the groups and contacts in the different groups inside a plugin, using Messenger API... Also that's why I want the oMessenger object to work.. If I can't make this work, then the plugin have to have WM and WM running, and then I might as well do the contact list thing in an seperate exe....

Anybody help? :D... Thx in advance....

BTW: The *.link suggestion will be released in a "beta" soon... :D... I only need these 2 question answered... And then fix up the whole thing... :D... so expect a release soon if I get an answer...


RE: oMessenger in Plus! API by Dempsey on 01-26-2005 at 10:46 PM

umm with the first question, i thoguh you still needed the reference to Windows Messenger, and then use

code:
Public WithEvents objMessenger As MessengerAPI.Messenger
I'm not 100% sure tho
RE: oMessenger in Plus! API by Stigmata on 01-26-2005 at 10:46 PM

in the new plus api, the messenger object is already identified :P


RE: oMessenger in Plus! API by (CyBeRDuDe) on 01-27-2005 at 07:22 AM

quote:
Originally posted by Dempsey
umm with the first question, i thoguh you still needed the reference to Windows Messenger, and then use
code:
Public WithEvents objMessenger As MessengerAPI.Messenger
I'm not 100% sure tho

Okay, this works too... But then how can I use the oMessenger object in the initialize?
Like this, am I right?
code:
objMessenger = oMessenger

But this won't work... the plugin just crashes exactly at this point...? What am I supposed to do, to get the oMessenger instead of the Messenger API...
And do I also have to have a reference to the messenger API even when using oMessenger as API?... I'm am doing that, was just wondering if it would work without the reference....

quote:
Originally posted by Stigmata
in the new plus api, the messenger object is already identified :P

What do you mean?... the messenger object is already indetified as oMessenger in the initialize function?.... yes I know that... that's the object I need to know to get functioning properly... :D...

RE: oMessenger in Plus! API by Stigmata on 01-27-2005 at 07:39 AM

if its already identified, it should  function fine :S

are you using non-readonly bits in ur sample class module?


RE: oMessenger in Plus! API by (CyBeRDuDe) on 01-27-2005 at 08:18 AM

Hey... It works alright now... Now it just need to get it working in another form/module besides the Class....
I have located my problem... It seems I have skipped something.. but I was possitivly sure that I tried this, but ohh well it works now... :D..

I understood what you ment by identified, so I tried using like this in the initialize...

code:
Msgbox oMessenger.MyFriendlyName
and it worked... so I tried adding this to the declarition
code:
Public objMessenger
everytime I tried before I always had an As arguement behind...
And then in initilize I just use
code:
Set objMessenger = oMessenger
And it works perfectly.... And you don't need to have the reference to the Messenger API... but without this reference you won't be able to see the different calls and commands you can do, so I have this reference on as long as i'm programming, and then just remove it later on... :D...
But why won't it work in my from in the Project?.. the objMessenger is set to Public..
Do I need to make them private and then in the from call something like this
code:
Set objMessenger = New Sample.oMessenger
Or something?

Then to the other question?... the contact list problem?... Can anybody confirm this problem?.. just so I know it isn't only at my side... :D... And could anybody give an alternative?...

Thanks for your help!!! :D...
RE: oMessenger in Plus! API by Wouter on 01-28-2005 at 03:51 PM

code:
Dim objMessenger As New Sample

RE: oMessenger in Plus! API by (CyBeRDuDe) on 01-28-2005 at 04:20 PM

quote:
Originally posted by Wouter
code:
Dim objMessenger As New Sample


Thx wouter for asnwering... :D... But I found out it worked across forms... :D... my problem was that when trying I had forgotten to turn on the reference to the Messenger Type Api Library, and in my code I used objMessenger.MyStatus = MISTATUS_AWAY... and this of course didn't work when I didn't have the reference... but wothout the reference I of course just need to use the numbers instead...
So alll my problems have been solved, except the one with the contact list problem... but doesn't look like anybody have an answer to this...