It is currently April 25th, 2024, 5:38 am

WindowMessage vs NowPlaying

Share and get help with Plugins and Addons
User avatar
Fuzzybat23
Posts: 44
Joined: May 10th, 2013, 1:21 am

WindowMessage vs NowPlaying

Post by Fuzzybat23 »

Seems to me that NowPlaying is alot easier to use than WindowMessage. The only reason for this is because the Manual entry for the WindowMessage plugin is grossly underwritten. While I understand that they can't list every wParam and lParam for each player, that's something we'd need to research on our own, they could go into more detailed depth on its use.

EX: Messages can also be sent on demand with the !CommandMeasure bang. The arguments are similar that of the WindowMessage option. !CommandMeasure "MeasureName" "SendMessage Msg wParam lParam"

Ok, so.... what exactly is the Msg value supposed to be? There is absolutely no description or clarification on that parameter. I've found out that Mediaplayer uses 273, but so far that's only a number to me. What does it mean?

Also:

Show song progress. In the following example, the [MeasureWinampDuration] will return the current song position as a value between 0 and 1. Then you can use the Bar meter to display the value.

Code: Select all

[MeasureWinampFull]
Measure=Plugin
Plugin=WindowMessagePlugin
WindowClass=Winamp v1.x
WindowMessage=1024 1 105

[MeasureWinampCurr]
Measure=Plugin
Plugin=WindowMessagePlugin
WindowClass=Winamp v1.x
WindowMessage=1024 0 105

[MeasureWinampDuration]
Measure=Calc
Formula=(MeasureWinampCurr<=0)?0:(MeasureWinampCurr/(MeasureWinampFull*1000+1))

Um, sorry but wrong. That doesn't SHOW anything. Those are all measures. If you're going to describe the code as it showing something, then include the Meter that actually shows what you're talking about, too.

I'm not knocking rainmeter,e I love the program. Just saying that windowmessage could be far more useful if we were given an actually usable manual entry on the plugin.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: WindowMessage vs NowPlaying

Post by moshi »

i should have known better. :/

this is a manual, not a tutorial. if you want to know how to make a bar meter, have a look at the linked page. there is no need for the manual to be repetitive. that's the best thing about hyperlinks.

also you seem to think that the WindowMessage plugin is about media players. it is not. it is about all Windows applications. Winamp was just used as an example.
Last edited by moshi on June 9th, 2013, 4:08 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: WindowMessage vs NowPlaying

Post by jsmorley »

moshi wrote:i should have known better. :/
LOL... No good deed goes unpunished.

The docs for WindowMessage could no doubt be better, but:

1) It was written in the very early "bad old days of Rainmeter documentation" and since it is almost is never used by folks anymore with NowPlaying available, it just has not been looked at much.

2) It makes an assumption that anyone using it will need to have some understanding of how Window Message in the "code" sense work in Windows / C++, and the plugin doesn't try to make folks into experts in window messaging, but just provide an interface from Rainmeter to that functionality.

The criticisms of that part of the manual are fair enough.
User avatar
Fuzzybat23
Posts: 44
Joined: May 10th, 2013, 1:21 am

Re: WindowMessage vs NowPlaying

Post by Fuzzybat23 »

;D Anyway, from what I understand, vaguely, about windowmessages, you could do far more with a media player skin than you ever could with nowplaying. Like.. with nowplaying, you can only display the path to the file you're playing, but with windowmessages you can actually open a window to get the file you want to play. Or add a fast forward/reverse feature instead of just skipping to the next or previous song.


http://fuzzybat23.deviantart.com/art/Completed-Media-Player-Remote-376547767
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: WindowMessage vs NowPlaying

Post by poiru »

Window messages are what Windows uses to inform applications about events (as well as other things). For example, when you click on a GUI button, Windows sends a message to the application to let it know that something was clicked.

The WindowMessage plugin is basically a simple wrapper around the SendMessage function. It is not simple to use. You will need to consult the documentation of whatever application you want to interact with to learn about the supported messages. The WindowMessage plugin does not relate to media players in any way. Many media players just happen to use window messages.
Fuzzybat23 wrote:Ok, so.... what exactly is the Msg value supposed to be? There is absolutely no description or clarification on that parameter. I've found out that Mediaplayer uses 273, but so far that's only a number to me. What does it mean?
273 is the decimal representation of the WM_COMMAND message.