It is currently March 29th, 2024, 1:52 pm

Windows Now Playing

Share and get help with Plugins and Addons
User avatar
Cariboudjan
Posts: 264
Joined: May 12th, 2019, 8:55 am

Re: Windows Now Playing

Post by Cariboudjan »

Couldn't I just use Window Messages to get the Windows 10 media player information from the OS directly instead of from every individual application?

I don't really care if its not compatible with every single application. If an app developer doesn't support the most basic s**t the OS has to offer, it's probably not a very good or popular application.

Less moving parts the better, I say. If the developer's application doesn't send their information to Windows, or Windows can't get that information from the player, then it's not worth my time.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

Cariboudjan wrote: July 15th, 2021, 6:18 am Couldn't I just use Window Messages to get the Windows 10 media player information from the OS directly instead of from every individual application?

I don't really care if its not compatible with every single application. If an app developer doesn't support the most basic s**t the OS has to offer, it's probably not a very good or popular application.

Less moving parts the better, I say. If the developer's application doesn't send their information to Windows, or Windows can't get that information from the player, then it's not worth my time.
Agreed, but what I meant was that the app should expose its info through its window title. As far as the examples in the manual are concerned, that seems pretty much the only way the plugin can GET info. When it comes to SET stuff, I believe the plugin is much more potent, by using those message parameters. The former is where I see some possible shortcomings. I might be wrong though, and if I am, the better. :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
JamHadar
Posts: 7
Joined: August 24th, 2021, 9:33 am

Re: Windows Now Playing

Post by JamHadar »

I have a question.

Is there any chance that you can show me source code of app? Or at least tell me on what language you wrote it.

I code as a hobby and really curious about this one, beacause i wanted to do something simailar.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

JamHadar wrote: September 6th, 2021, 5:48 pmIs there any chance that you can show me source code of app? Or at least tell me on what language you wrote it.

I code as a hobby and really curious about this one, beacause i wanted to do something simailar.
Source code of what app?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
JamHadar
Posts: 7
Joined: August 24th, 2021, 9:33 am

Re: Windows Now Playing

Post by JamHadar »

Yincognito wrote: September 27th, 2021, 5:12 pm Source code of what app?
"WindowsNowPlaying.exe" that comes with the skin. I guess that it does all the job of getting the info.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

JamHadar wrote: October 25th, 2021, 7:13 am "WindowsNowPlaying.exe" that comes with the skin. I guess that it does all the job of getting the info.
Ah yes, indeed. Well, it seems that the source code isn't available as far as I'm aware of, but who knows, maybe it will be released someday... :confused:

EDIT: Sorry, I typed without looking. It uses .NET, so it might be a C program (or another Microsoft based programming environment). Judging by its tiny size, it might just be a simple call to some Microsoft Common Object Runtime Library (mscorelib) function(s) or other Windows.Media related functions. At least that's what I could quickly get from disassembling it. :D Going a bit further, it might be similar in form to this or using this, this or this (just speculating here). This could be the way the standard NowPlaying plugin in Rainmeter approaches things as well - didn't check that out though.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
JamHadar
Posts: 7
Joined: August 24th, 2021, 9:33 am

Re: Windows Now Playing

Post by JamHadar »

Yincognito wrote: October 25th, 2021, 12:47 pm Ah yes, indeed.
Wow. That's a lot of info! Thanks a lot. =)
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

JamHadar wrote: November 1st, 2021, 1:21 pm Wow. That's a lot of info! Thanks a lot. =)
No problem - hopefully it's accurate as well, though I can't guarantee that part. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
PrincessPandaMeter
Posts: 4
Joined: November 9th, 2022, 1:45 am

Re: Windows Now Playing

Post by PrincessPandaMeter »

Excuse me, but when attempting to implement the code for retrieving the title of the audio playing, all it does is return an apostrophe. The skin provided works normally, but for some reason, my code doesn't.

Here's the code for reference:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
OnUpdateAction=[!CommandMeasure MeasureTitle "Run"]

[Metadata]
Name=
Author=
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[MeasureTitle]
Measure=Plugin
Plugin=RunCommand
Parameter=WindowsNowPlaying title 64 ...
OutputType=ANSI
DynamicVariables=1
OutputType=ANSI
OutputFile=#CURRENTPATH#title.txt

[NowPlaying]
Meter=String
X=0
Y=0
FontColor=197,252,223,255
FontSize=14
FontFace=PrincessPandaFont
ClipString=1
AntiAlias=1
Text="NOW PLAYING:"

[WhatsPlaying]
Meter=String
MeasureName=MeasureTitle
X=0
Y=16R
W=200
H=50
FontColor=197,252,223,255
FontSize=14
FontFace=PrincessPandaFont
AntiAlias=1
ClipString=1
Text="%1"
Last edited by PrincessPandaMeter on November 9th, 2022, 9:52 pm, edited 1 time in total.
Don't rain on my parade!
Image
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows Now Playing

Post by balala »

PrincessPandaMeter wrote: November 9th, 2022, 1:49 am Excuse me, but when attempting to implement the code for retrieving the title of the audio playing, all it does is return a comma. The skin provided works normally, but for some reason, my code doesn't.
Not sure why are you using a RunCommand plugin measure ([MeasureTitle]) to get the title. Is there any reason you're not using a NowPlaying measure? Also, not sure what provided skin are you talking about.
If there is not, replace the [MeasureTitle] measure with the following one:

Code: Select all

[MeasureTitle]
Measure=NowPlaying
PlayerName=WMP
PlayerType=TITLE
Along with this replacement, you can remove the OnUpdateAction option of the [Rainmeter] section, it not being needed anymore.
If needed (most probably it is), take care to replace the WMP value in the PlayerName option with the appropriate player name. These names are available here. Use the one related to the player you want to use the skin with.
If for any reason you can't or don't want to use NowPlaying measure, please come back and let us know.