Shoutbox

Help needed with showing my own element under personal message - 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)
+----- Thread: Help needed with showing my own element under personal message (/showthread.php?tid=96772)

Help needed with showing my own element under personal message by sayed on 02-12-2011 at 12:28 PM

Hello all,

I need help with showing my own element under the personal message,
like this image:

[Image: DownloadManager.png?DocumentID=7865]

I want to put my own text, how ??

Please help me fast. :$

And thanks in advance


RE: Help needed with showing my own element under personal message by matty on 02-12-2011 at 12:38 PM

Do you mean you want to show the current song you playing? Or you just want to add some text?


RE: Help needed with showing my own element under personal message by mynetx on 02-12-2011 at 12:40 PM

JScript code:
function setNowPlaying(enabled, type, format, title, artist, album, contentID) {
    if (typeof(type) == "undefined") type = "Music";
    if (typeof(format) == "undefined") format = "";
    if (typeof(title) == "undefined") title = "";
    if (typeof(artist) == "undefined") artist = "";
    if (typeof(album) == "undefined") album = "";
    if (typeof(contentID) == "undefined") contentID = "";
    enabled = Math.abs(enabled);
    var WM_COPYDATA = 0x4A;
    var song = Interop.Allocate(512);
    song.WriteString(0, "\\0" + type + "\\0" + enabled + "\\0" + format + "\\0" + title + "\\0" + artist + "\\0" + album + "\\0" + contentID + "\\0");
    var copyDataStruct = Interop.Allocate(12);
    copyDataStruct.WriteDWORD(0, 0x547);
    copyDataStruct.WriteDWORD(4, song.Size);
    copyDataStruct.WriteDWORD(8, song.DataPtr);
    var hMSGRUI = 0;
    do {
        hMSGRUI = Interop.Call("User32", "FindWindowExW", 0, hMSGRUI, "MsnMsgrUIManager", 0);
        if (hMSGRUI > 0) {
            Interop.Call("User32", "SendMessageW", hMSGRUI, WM_COPYDATA, 0, copyDataStruct)
        }
    } while ( hMSGRUI != 0 )
}
 
// for showing:
setNowPlaying(true, "Music", "{0} - {1}", "Break Your Heart", "Taio Cruz Fr. Ludacris", "Album Name"); 
// for hiding:
setNowPlaying(false);


RE: Help needed with showing my own element under personal message by sayed on 02-12-2011 at 12:45 PM

quote:
Originally posted by matty
Do you mean you want to show the current song you playing? Or you just want to add some text?
No, I want to put my own text using code...
quote:
Originally posted by mynetx
JScript code:
function setNowPlaying(enabled, type, format, title, artist, album, contentID) {
    if (typeof(type) == "undefined") type = "Music";
    if (typeof(format) == "undefined") format = "";
    if (typeof(title) == "undefined") title = "";
    if (typeof(artist) == "undefined") artist = "";
    if (typeof(album) == "undefined") album = "";
    if (typeof(contentID) == "undefined") contentID = "";
    enabled = Math.abs(enabled);
    var WM_COPYDATA = 0x4A;
    var song = Interop.Allocate(512);
    song.WriteString(0, "\\0" + type + "\\0" + enabled + "\\0" + format + "\\0" + title + "\\0" + artist + "\\0" + album + "\\0" + contentID + "\\0");
    var copyDataStruct = Interop.Allocate(12);
    copyDataStruct.WriteDWORD(0, 0x547);
    copyDataStruct.WriteDWORD(4, song.Size);
    copyDataStruct.WriteDWORD(8, song.DataPtr);
    var hMSGRUI = 0;
    do {
        hMSGRUI = Interop.Call("User32", "FindWindowExW", 0, hMSGRUI, "MsnMsgrUIManager", 0);
        if (hMSGRUI > 0) {
            Interop.Call("User32", "SendMessageW", hMSGRUI, WM_COPYDATA, 0, copyDataStruct)
        }
    } while ( hMSGRUI != 0 )
}
 
// for showing:
setNowPlaying(true, "Music", "{0} - {1}", "Break Your Heart", "Taio Cruz Fr. Ludacris", "Album Name"); 
// for hiding:
setNowPlaying(false);


I don't want to show the song I'm playing...
RE: Help needed with showing my own element under personal message by whiz on 02-12-2011 at 12:47 PM

If you just want to show text, can't you just use the personal message box?


RE: Help needed with showing my own element under personal message by sayed on 02-12-2011 at 12:52 PM

quote:
Originally posted by whiz
If you just want to show text, can't you just use the personal message box?
No, I wanna show a text from code under the personal message as I said before..
RE: Help needed with showing my own element under personal message by matty on 02-12-2011 at 01:00 PM

So you are trying to create a brand new element on the contact list window? Not possible.


RE: Help needed with showing my own element under personal message by sayed on 02-12-2011 at 01:02 PM

quote:
Originally posted by matty
So you are trying to create a brand new element on the contact list window? Not possible.
Yes, but why not? How that script in the picture does ?!!
RE: Help needed with showing my own element under personal message by mynetx on 02-12-2011 at 01:03 PM

quote:
Originally posted by sayed
How that script in the picture does ?
The script shows a currently playing song, with a function similar to mine above. So, it is not inserting a new field.
RE: Help needed with showing my own element under personal message by matty on 02-12-2011 at 01:05 PM

Well that script isn't adding anything new. They have the user's Nick Name, the user's Personal Message and the user's Media Message... no new elements are being added.


RE: Help needed with showing my own element under personal message by sayed on 02-12-2011 at 01:48 PM

Thanks, but is there any way to do this? like making a skin with script for it does that??


RE: Help needed with showing my own element under personal message by mynetx on 02-12-2011 at 01:53 PM

quote:
Originally posted by sayed
like making a skin
Yes, with skins you can create new elements. Please note, though, that they will only show on your end, not on the end of your contacts.
RE: Help needed with showing my own element under personal message by sayed on 02-12-2011 at 01:58 PM

quote:
Originally posted by mynetx
quote:
Originally posted by sayed
like making a skin
Yes, with skins you can create new elements. Please note, though, that they will only show on your end, not on the end of your contacts.
What do you mean by on my end ?
RE: Help needed with showing my own element under personal message by whiz on 02-12-2011 at 02:27 PM

You (on your end) will see any new elements you create using the skin.  None of your other contacts will see this, unless they too are using the same skin.


RE: Help needed with showing my own element under personal message by matty on 02-12-2011 at 02:27 PM

The text will only show on your computer not on anyone you are chatting with.


RE: Help needed with showing my own element under personal message by sayed on 02-12-2011 at 02:45 PM

Yes thanks, thats what I want, any tutorial to do this ?


RE: Help needed with showing my own element under personal message by matty on 02-12-2011 at 02:51 PM

Create an element with the skin, then learn to use Active Accessibility to set the text.