It is currently November 4th, 2024, 6:05 am

Windows Now Playing

Share and get help with Plugins and Addons
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

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.
It works for me, with your code (skin at bottom left in the screenshot, the code at the right):
Windows NowPlaying.jpg
P.S. The question marks are probably because Rainmeter doesn't support Unicode characters past a certain limit (U+FFFE if I'm not mistaken), so not many emojis there. Maybe you can share which song you're having issues with, and what "music platform" are you trying to interrogate (the YouTube one seems to work fine, as you can see).
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

balala wrote: November 9th, 2022, 8:26 amAlso, not sure what provided skin are you talking about.
The one in this post - he just replaced the code.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16699
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows Now Playing

Post by balala »

Yincognito wrote: November 9th, 2022, 2:38 pm The one in this post - he just replaced the code.
:? It seems I made a confusion. :? Again. My bad...
Sorry for my mistake.
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

balala wrote: November 9th, 2022, 3:51 pm :? It seems I made a confusion. :? Again. My bad...
Sorry for my mistake.
No problem, as always. ;-)
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 »

Yincognito wrote: November 9th, 2022, 2:28 pm It works for me, with your code (skin at bottom left in the screenshot, the code at the right):
Windows NowPlaying.jpg

P.S. The question marks are probably because Rainmeter doesn't support Unicode characters past a certain limit (U+FFFE if I'm not mistaken), so not many emojis there. Maybe you can share which song you're having issues with, and what "music platform" are you trying to interrogate (the YouTube one seems to work fine, as you can see).
Here's what it looks like on my Rainmeter:
Image
(yes, it's one of my favorite Sonic the Hedgehog songs ever)
Don't rain on my parade!
Image
User avatar
PrincessPandaMeter
Posts: 4
Joined: November 9th, 2022, 1:45 am

Re: Windows Now Playing

Post by PrincessPandaMeter »

Okay, I just realized why it wasn't working at all.

I didn't use the "WindowsNowPlaying.exe" software that came with the skin. I thought the ".ini" file came with the software itself. :(

Apologies for wasting everyone's time, though I may stick around here because I'm genuinely interested in Rainmeter!
Don't rain on my parade!
Image
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

PrincessPandaMeter wrote: November 9th, 2022, 10:03 pm Okay, I just realized why it wasn't working at all.

I didn't use the "WindowsNowPlaying.exe" software that came with the skin. I thought the ".ini" file came with the software itself. :(

Apologies for wasting everyone's time, though I may stick around here because I'm genuinely interested in Rainmeter!
Yeah, the .ini file can never come with a 'software' itself, since it's just a text file where you write down the "options" (or keywords / commands, if you like) that are then interpreted by Rainmeter (the actual software) and can use other executables (from .dll-s of Rainmeter plugins like RunCommand, to additional programs like the "WindowsNowPlaying.exe" in this case). While Rainmeter does include its standard plugin .dll-s, a skin 'package' (i.e. a .rmskin file) can include the rest (e.g. other non standard .dll-s, or various other executables like the one you mentioned) to be copied appropriately once the skin package is "installed".

Nice to hear that you found out why it wasn't working and managed to solve the issue. No need to apologize for asking things, that helps with the learning process, and Rainmeter is indeed interesting since you can do quite a lot with it, once you master the basics. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
tirinhadepeixe
Posts: 1
Joined: December 16th, 2022, 2:52 pm

Re: Windows Now Playing

Post by tirinhadepeixe »

Yincognito wrote: November 9th, 2022, 11:05 pm Nice to hear that you found out why it wasn't working and managed to solve the issue. No need to apologize for asking things, that helps with the learning process, and Rainmeter is indeed interesting since you can do quite a lot with it, once you master the basics. :thumbup:
In the topic of asking things, is there a way to display characters with accent like á é or ç ã?

Some songs just display different characters
Image

I discovered a way to switch them using a line of code like

Code: Select all

Substitute="Æ":"ã"
But some characters like á or é don't display anything

Image

I can change font types and stuff, but I'm not familiar with this programming language enough to know how to fix this
User avatar
balala
Rainmeter Sage
Posts: 16699
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows Now Playing

Post by balala »

tirinhadepeixe wrote: December 16th, 2022, 3:14 pm I discovered a way to switch them using a line of code like

Code: Select all

Substitute="Æ":"ã"
No, substitution is definitely not a good approach. For first check the encoding of your .ini file. Make sure it is set to UTF-16 LE. Some details here.
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

Post by Yincognito »

tirinhadepeixe wrote: December 16th, 2022, 3:14 pm In the topic of asking things, is there a way to display characters with accent like á é or ç ã?
[...]
I can change font types and stuff, but I'm not familiar with this programming language enough to know how to fix this
First, I don't have the language set in Windows to include some of those characters, so my tests are probably limited by that (I might be wrong here though).
Secondly, even though I looked for the same songs (e.g. LUCAS HYPE - CORAÇÃO PARTIDO), for some reason the à seems to always result in plain A, both when running at the command line and within Rainmeter / RunCommand, not sure why.
Thirdly, there seems to be a difference between what I get by running at the command line (i.e. WindowsNowPlaying title 64 ... after spawning the Unicode featured command prompt via CMD.EXE /U in the skin folder) and what I get from the RunCommand plugin (i.e. the result of the measure in the skin, also visible in the Rainmeter Log) - again, not sure why, because they should be identical (notice that the Ç is actually € in the RunCommand result):
WindowsNowPlaying Unicode.jpg
At first I thought that the UTF-16 encoding of the skin .ini or the output of the WindowsNowPlaying.exe was the problem, but then the skin is already UTF-16 encoded (covered in balala's suggestion), and the executable output doesn't seem to produce those funky characters at the Unicode featured command prompt for me. Tried changing the OutputType option of the measure from ANSI to UTF16 (the default) or UTF8 or running CMD with the /A parameter to see if the ANSI worked, but to no avail. The font also matters when it comes to those characters, because some fonts are not exatly complete in that regard.

As for the solution, as balala mentioned, the Substitute is a possibility, though it will depend on the font. Regarding the characters that result in "nothing", that nothing is actually something, most likely a type of blank space, so you may have better chances if you used the Rainmeter Log to right click on the measure result, choose String: copy to clipboard, paste it somewhere in your skin and keep only that blank character for the substitution. From my experience though, there could be problems with this approach since different characters might be "transformed" into the same blank space (just like the emoji characters outside the Rainmeter range are turned into the same ?? string), but it doesn't hurt to try, maybe you'll get lucky.

Another alternative would be to see if you can get what you want with the WebNowPlaying plugin. I tried it, but I didn't even manage to get a result at all, let alone see if the Unicode characters are displayed properly. By the way, if you want to look for Unicode characters, you can do so on Wiki or Compart.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth