Shoutbox

changing dp from a plus! plugin - 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: changing dp from a plus! plugin (/showthread.php?tid=59883)

changing dp from a plus! plugin by rawny on 05-28-2006 at 10:26 PM

Hi,

this is my first post on these forums so be gentle ;)

I'm attempting to write a plugin for plus!, this is my first attempt and I am using Delphi (7).  I was wondering how can I change the msn display pic from the plugin code.  I'm hoping to trigger this with an on-timer event to do a kind of dp switcher.  Please dont suggest I use another plugin as I'd like to write my own :)

Thanks,

Rawny


I know more or less what I'm doing, I have quite a bit of experience of programming in Delphi, I just don't know how to change the display picture in msn from delphi using the plus! libraries and i was wondering if anyone could tell me

Edit: removed most irrelevant text


RE: changing dp from a plus! plugin by absorbation on 05-29-2006 at 12:18 PM

I know the mess.be forums know alot about add-on programming, they were talking about this thing the other week I think. Just a heads up you may or may not know Messenger Plus! is changing and soon plugins will be replaced by scripts. Scripts will contains new and exciting functions for messenger, but you need a jscript knowledge to use them. However, you can still use Delphi, as you can make some functions all from a .dll using the scripts :)


RE: changing dp from a plus! plugin by RaceProUK on 05-29-2006 at 01:38 PM

In a plugin, use the Property property of the IMessenger3 interface with index 2 e.g. IMessenger3.Property[2]. It's a RW property that contains the current DP.

Although scripts might expose this differently, I don't know for sure.


RE: changing dp from a plus! plugin by rawny on 05-30-2006 at 04:52 PM

Thanks very much guys I'll give it a go. :)

Edit: um... I put

  " MessengerAPI_TLB.IMessenger3.property[2] := 'C:/Explosion.jpg'; "

and I got

" [Error] PluginDemo.dpr(98): Identifier expected but 'PROPERTY' found "

:S


RE: changing dp from a plus! plugin by TheGeek on 05-30-2006 at 05:32 PM

Maybe "property" is a delphi keyword, look the correct name up in your header files.


RE: changing dp from a plus! plugin by rawny on 05-30-2006 at 05:41 PM

// *********************************************************************//
// Interface: IMessenger3
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {D50C3386-0F89-48F8-B204-3604629DEE10}
// *********************************************************************//
  IMessenger3 = interface(IMessenger2)
    ['{D50C3386-0F89-48F8-B204-3604629DEE10}']
    function Get_Property_(ePropType: MMESSENGERPROPERTY): OleVariant; safecall;
    procedure Set_Property_(ePropType: MMESSENGERPROPERTY; pvPropVal: OleVariant); safecall;
    property Property_[ePropType: MMESSENGERPROPERTY]: OleVariant read Get_Property_ write Set_Property_;
  end;

So I'm guessing something like;

"MessengerAPI_TLB.IMessenger3._property[2]..."

Edit: That didn't work as you might expect...hmm....


RE: changing dp from a plus! plugin by RaceProUK on 05-30-2006 at 07:12 PM

quote:
Originally posted by rawny
MessengerAPI_TLB.IMessenger3._property[2]
Or maybe 'MessengerAPI_TLB.IMessenger3.Property_[2]', as it actualy says in the header.
RE: changing dp from a plus! plugin by rawny on 05-30-2006 at 07:58 PM

:D thankyou very much

(mental not to self: ensure more than 5 hours sleep before reading delphi documents)

;)

Sorry/Thanks to everyone

Rawny

Edit: Just to clarify say I want to set "MessengerAPI_TLB.IMessenger3.Property_[2]" to a picture "C:\Explosion.jpg" what do I write?

I don't think it works as
"MessengerAPI_TLB.IMessenger3.Property_[2] := C:\Explosion.jpg"

I need to use "set_property_" I'm guessing but how, any help would be much appreciated :)


RE: changing dp from a plus! plugin by rawny on 05-30-2006 at 09:01 PM

I tried this;

"MessengerAPI_TLB.IMessenger3.Set_Property_[2]('C:/Explosion.jpg');"

and I'm only getting one error

"[Error] PluginDemo.dpr(105): Object or class type required"

:s

I'm not sure where it wants a class or what it wants really, any helpful ideas?


RE: changing dp from a plus! plugin by RaceProUK on 05-31-2006 at 12:12 AM

quote:
Originally posted by rawny
MessengerAPI_TLB.IMessenger3.Property_[2] := C:\Explosion.jpg
should work. Bear in mind that I don't know Delphi, but I do know a fair few languages. Just make sure you actually wrap the text string in an OleVariant type first.
RE: changing dp from a plus! plugin by J-Thread on 05-31-2006 at 08:03 AM

And are you sure that the MessengerAPI_TLB object is the one that is passed by plus in the Initialize function? As far as I know you can't just "create" your own messenger object...