Shoutbox

display pictures - 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: display pictures (/showthread.php?tid=49269)

display pictures by wallawalla on 08-21-2005 at 09:18 AM

hey everyone, im new, and i strongly suspect there have already been tons of threads about this, but anyway, i've been working on a plugin today that changes my display picture to the album cover art of whatever song i'm listening to in iTunes.

anyway, i've written a script (in jscript) that takes the song i'm listening to, extracts the art and saves it over a specified file (which should eventually be C:/Program Files/Messenger Plus! 3/Plugins/idp/artwork/art.jpg or something like that). I have also started the plugin, adding commands for enabling and disabling it. What i need to know is the best way to do this:

I need to recall the script every 5-10 seconds or so. (which, being a novice programmer, i have no idea how to do.. although i could easily google it... but i think its probably better to get it all from one place  :p)
I need to refresh my dp. (probably by loading the file as my dp again)
I need to find the messenger plus install directory to find where i should put the art....

The plugin is written in visual basic .NET and i may need to change the script to VBscript, i dont know..

i was wondering if display pictures are part of MSERVICEPROPERTY or something like that...  *-)

anyway, if someone could help me out on any of those 3 things, i would be very grateful.

:)


RE: display pictures by DomGrimm on 08-21-2005 at 11:54 AM

I can't help you:(
But I wish you good luck with the plugin, I've been looking for something like this for a while(Y)


RE: display pictures by absorbation on 08-21-2005 at 12:00 PM

erm i like the idea you can ask destruction who uses a refesh in his plugin i could give you his e-mail address if you want :)


RE: display pictures by Ezra on 08-21-2005 at 12:48 PM

Only thing I can give you is the install path of MSN :)

HKCR\CLSID\{0D81DFEC-5610-4a2b-9B57-FC33D21366F0}\LocalServer32 (default value)


RE: display pictures by Eljay on 08-21-2005 at 02:37 PM

quote:
Originally posted by Ezra
Only thing I can give you is the install path of MSN :)

HKCR\CLSID\{0D81DFEC-5610-4a2b-9B57-FC33D21366F0}\LocalServer32 (default value)

HKLM\SOFTWARE\Microsoft\MSN Messenger\InstallDirecrory

this key gives you the dir and not the file but anyway what wallawalla needed was the msgplus folder path

HKLM\SOFTWARE\Patchou\MsgPlus2\BinDir
RE: display pictures by wallawalla on 08-22-2005 at 05:58 AM

ok cool thanks for that...

now i just really need how to change the display picture...

it says nothing about it in the API documentation.. as far as i can see....

i dont really need a refresh thing, just something that changes the display picture to a certain file, which, if called over and over again, would have the effect of refreshing it


RE: display pictures by wallawalla on 08-24-2005 at 05:04 AM

i havent finished by the way...

is it just that no one knows how to change a display picture or cant be bothered helping or something?


RE: display pictures by matty on 08-24-2005 at 06:06 AM

VB6

code:
'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_Interface As MessengerAPI.Messenger
Public Const MCONTACTPROP_USERTILE_PATH As Integer = 2

Public Function Initialize(ByVal nVersion As Long, _
                           ByVal sUserEmail As String, _
                           ByVal oMessenger As Object) _
                           As Boolean
    Initialize = True
    Set MessengerAPI_Interface = oMessenger
    MessengerAPI_Interface.MyProperty(MCONTACTPROP_USERTILE_PATH) = "%path%"
End Function


VB.Net
code:
    '//
    '// Shared Variables
    '//////////////////////////////////////////////////////////////////////

    Public Const MCONTACTPROP_USERTILE_PATH As Integer = 2
    Public Shared WithEvents oMessenger As MessengerAPI.MessengerClass

    '//
    '// Purpose: Initialization function
    '//////////////////////////////////////////////////////////////////////

    Public Function Initialize(ByVal nVersion As Integer, _
                               ByVal sUserEmail As String, _
                               ByVal oMessenger As MessengerAPI.MessengerClass) _
                               As Boolean
        Sample.oMessenger = oMessenger
        oMessenger.MyProperty(MCONTACTPROP_USERTILE_PATH) = "%path%"
        Initialize = True
    End Function


RE: display pictures by wallawalla on 08-24-2005 at 06:48 AM

ok cool thanks  :D

ill get on to it soon


im assuming that sample is the name of the class?
RE: display pictures by wallawalla on 08-24-2005 at 09:42 AM

alright ive done that..

but a few things are going wrong...

firstly, it only saves the picture file when i start the program, which is probably because i dont have a very good delay function..

is there anything in VB .NET that acts like setTimeout() in javascript?

also, it doesnt load the picture into msn so i dont know whats wrong there either

it doesnt show up in the plugins menu and i cant turn it on or off like i should.... (ie it doesnt accept input from msn)

and yeah...

ill probably need a good plugin writer to answer this...


RE: display pictures by matty on 08-24-2005 at 05:31 PM

Ok firstly you dont need to double post, instead use the [Image: edit.gif] button to edit your posts.

Secondly create a form that has no border 0 height and 0 width. Put all your code there in a timer.

On the Initalize function use the ShowWindow API to show the window.

Public Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_SHOWNOACTIVATE = 4


code:
ShowWindow Form1.hWnd, SW_SHOWNOACTIVATE

RE: display pictures by wallawalla on 08-26-2005 at 08:30 PM

ok thanks, sorry about the double post

now it says "hWnd is not a valid member of xiDP" (xiDP is my form)

im assuming i need to add a refernce to windows or something?

...