Shoutbox

[Release] mPSM (Version 1.32) - 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: [Release] mPSM (Version 1.32) (/showthread.php?tid=70082)

[Release] mPSM (Version 1.32) by Spunky on 12-30-2006 at 09:55 PM

mPSM can add a prefix and/or suffix to your Media Personal Message as well as being able to chaneg the icon. I know xPSM could change the icon etc, but I don't think it could manipulate the Media PSM (See Below). I wrote this script as a request for one person and then others were coming to me for it so I thought I'd develop it a bit further and release it

RE: xPSM
xPSM was able to set a Media PSM with icons, but did not include any functionality for the ACTUAL current media, just able to set a PSM to look like a Media PSM

To open the interface, either type /mpsm in a chat window

OR

Use the menus and under the scripts menu, select "Settings..."

Known "Bugs":
-Changes to prefix/suffix/icon will only update when the current media is updated
-The actual media PSM will show for about a second when the current media changes whilst the script gathers information and then sets it


RE: [Release] mPSM (Version 1.32) by nod32 on 01-01-2007 at 03:48 PM

Great script! :)


RE: [Release] mPSM (Version 1.32) by -dt- on 01-01-2007 at 04:22 PM

normally its polite to credit people when you use their code, eg most people just write the name of the person above the function like

quote:
Function by -dt- (Matt Labrum) (Converted from http://forums.fanatic.net.nz/index.php?showtopic=11311&st=0# )


http://svn.thedt.net/scripts/codedump/nowPlayingSet.js
RE: [Release] mPSM (Version 1.32) by CookieRevised on 01-01-2007 at 06:28 PM

[OFF TOPIC]

true, but that code is so generally known and nothing unique that it can hardly be seen as "copyrighted" (bad term I know) or whatever. If credits are due, it is to the person who first discovered this method. Don't get me wrong, you wrote that function in JScript, but anybody who would convert the code found on MSNFanatic would end up with the exact same code...

And about the JScript setnowplaying code itself, there are a some things which can be done better. Starting with checking that the string isn't too long and making it possible to be polygamy compatible aka only sending it to the current process' window, which, IIRC, I was the first todo (I think somewhere on the MSNFanatic forums, don't know anymore), but again this is so logical and universal that giving credits is not needed, unless to the person who discovered it

[/OFF TOPIC]


RE: [Release] mPSM (Version 1.32) by EBFL on 01-01-2007 at 06:35 PM

Great script,
Exept is there a way where i can get them icons without turning on "what i'm listening to"


RE: [Release] mPSM (Version 1.32) by CookieRevised on 01-01-2007 at 06:40 PM

quote:
Originally posted by EnglandBoyForLife.
Great script,
Exept is there a way where i can get them icons without turning on "what i'm listening to"
no... because that is the way messenger works
RE: [Release] mPSM (Version 1.32) by -dt- on 01-01-2007 at 06:41 PM

quote:
Originally posted by CookieRevised
true, but that code is so generally known and nothing unique that it can hardly be seen as "copyrighted" (bad term I know) or whatever to you. If credits are due, it is to the person who first discovered this method.

And about the JScript setnowplaying code itself, there are a some things which can be done better. Starting with checking that the string isn't too long and making it polygamy compatible aka only sending it to the current process' window, which, IIRC, I was the first todo (I think somewhere on the MSNFanatic forums), but again this is so logical and universal that giving credits is not needed; he could've easly found this himself
yes but the fact is he didnt do it himself, i personally dont agree with sending it only to the current process, but heh i dont use polygamy but checking if the string is too long is a good idea though
RE: [Release] mPSM (Version 1.32) by CookieRevised on 01-01-2007 at 07:30 PM

[OFF TOPIC]

Originally edited in in previous post, but didn't saw you already replied, so:

EDIT & PS: don't get me wrong, I'm not entirly 100% behind what I've said here in my previous post myself... but it is a tricky subject, and my initial reaction was probably because of the way you replied to his script like he did something seriously bad while you didn't included anything new or different in that code compared to the original code shown on MSNFanatic (eg: like checking for string length, polygamy issue, etc), it is not even optimized or whatever, just a copy in itself.

quote:
Originally posted by -dt-
yes but the fact is he didnt do it himself
that's very true too...

[/OFF TOPIC]

quote:
Originally posted by -dt-
i personally dont agree with sending it only to the current process, but heh i dont use polygamy but checking if the string is too long is a good idea though

The reason for the need for polygamy compatibility is because such scripts as this might be configured differently according to who is logged in. If you don't include this, and one uses polygamy the script will even send the string multiple times to all messengers because of the way scripts are run in Plus!, which is useless...

Anyways, I would do it like this when I just copy the original code (so no double unneeded checks):
code:
// Sends to all running messengers
var hMSGRUI = 0;
while (hMSGRUI = Interop.Call('User32', 'FindWindowExW', 0, hMSGRUI, 'MsnMsgrUIManager', 0))
        Interop.Call('User32', 'SendMessageW', hMSGRUI, WM_COPYDATA, 0, copyDataStruct);
And my recommended implementation:
code:
// Sends only to our own messenger
var tIDCurrent = Interop.Call('Kernel32', 'GetCurrentThreadId');
var hMSGRUI = 0;
while (hMSGRUI = Interop.Call('User32', 'FindWindowExW', 0, hMSGRUI, 'MsnMsgrUIManager', 0))
        if (Interop.Call('User32', 'GetWindowThreadProcessId', hMSGRUI, 0) === tIDCurrent)
                Interop.Call('User32', 'SendMessageW', hMSGRUI, WM_COPYDATA, 0, copyDataStruct);
To make sure the string isn't too long, to avoid errors:
code:
song.WriteString(0, ('\\0' + type + '\\0' + Math.abs(enabled) + '\\0' + format + '\\0' + title + '\\0' + artist + '\\0' + album + '\\0' + contentID).substr(0, 253) + '\\0');

RE: [Release] mPSM (Version 1.32) by Spunky on 01-01-2007 at 09:02 PM

Not been on the forum in the last day or so so haven't seen these.

The code was sent to me by someone on MSN a long time ago now (can't remember who) and is actually used in my PSM+ script. I had got no idea who the author is and so could not give credit.

I would gladly go back and add credits to my scripts and in fact, I'd be very happy to be able to acknowledge the author of any snippets or functions that I use


RE: [Release] mPSM (Version 1.32) by DiExE on 08-16-2008 at 03:10 PM

Sorry but i don't speak english so good..

I found a bug in this script :)

I don't know if it is a bug or you did it to do publicity..
it is that when you sign in it didnt set the prefix and suffix that I configured..it sets "Listening to: " and "(mPSM)"..
the solution that I created is this:

in the declarations:

code:
var prefix;
var suffix;
var icon;


add this function:
code:
function OnEvent_Signin(Email){
    prefix= RR("prefix");
    suffix= RR("suffix");
    icon= RR("icon");
}