It is currently March 28th, 2024, 12:24 pm

Request Help to Resolve player.ini error in Mond Skin

Get help with creating, editing & fixing problems with skins
User avatar
BearTracks2Nowhere
Posts: 8
Joined: October 8th, 2021, 3:56 pm

Request Help to Resolve player.ini error in Mond Skin

Post by BearTracks2Nowhere »

I am new to Rainmeter, (I love it!). I am experiencing an odd problem with one of the skins that I am using, which is entitled, "Mond" - specifically involving the player. I am hoping that someone might be able to help me to address this.

The Player.ini generates an endless series of errors stating that it cannot open the 'play.png' file. The path depicted in the error message within the log shows the beginning portion of the file path prepended to the actual path. It is also calling for both 'Play.png' file AND the 'Pause37.png. The log begins generating endless error messages the moment I load 'player.ini'.

Image

r/Rainmeter - Request Help to Resolve player.ini error in Mond Skin

The correct path for both of these files should be as follows:

C:\Users\Bear4137\Documents\Rainmeter\Skins\Mond\@Resources\Pause.png37

C:\Users\Bear4137\Documents\Rainmeter\Skins\Mond\@Resources\Play.png

(Mond\Player\Player.ini)


I believe that the problematic section in player.ini is this one;

Code: Select all

[MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"
My understanding of this section is that it is saying that on the first press of the central image of the player (intial default as 'play') - on mousup, it plays the song file. On mouse up #2, it pauses the song, and on mouseup #3 it plays again. Then it loops through pause and play for subsequent mouse clicks until some over event happens.

I have searched every configuration file in Rainmeter and more specifically in the Mond skin, and cannot find anything that reasonably explains this.

Lastly, when I open the player.ini file to edit, the pasted section above is highlighted in gray. There is apparently an error, but I cannot find it. I read carefully through the 'substitution' portion of the Rainmeter manual, but I still cannot identify the error.

Image

r/Rainmeter - Request Help to Resolve player.ini error in Mond Skin

I have since found an unedited copy of player.ini HERE-->> https://forum.rainmeter.net/viewtopic.php?p=184010&hilit=mond+player# and replaced the player.ini that I had with it. Saved and refreshed, and upon opening it... I get the exact same cascade of errors stating that Mond/Rainmeter is unable to open the Play and/or pause images. So.. I am now certain that this is not something that I inadvertently did by putting a typo or a bad edit into the configuration file. The problem is elsewhere, but I haven't got a clue where else to look.

Any help would be most greatly appreciated. Thanks!
Last edited by balala on October 8th, 2021, 6:18 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City
Contact:

Re: Request Help to Resolve player.ini error in Mond Skin

Post by deflore08 »

Oh, sweeet! :( i might be wrong, but i have no my computer near, but it's concatenate all paths in one. I don't remember, maybe problem in the dots in this string :

Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png

Try:

Substitute="0":"#@#Play.png";"1":"#@#Pause.png";"2":"#@#Play.png
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Request Help to Resolve player.ini error in Mond Skin

Post by balala »

deflore08 wrote: October 8th, 2021, 5:39 pm Oh, sweeet! :( i might be wrong, but i have no my computer near, but it's concatenate all paths in one. I don't remember, maybe problem in the dots in this string :

Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png

Try:

Substitute="0":"#@#Play.png";"1":"#@#Pause.png";"2":"#@#Play.png
No, for sure not this. Comma is the separator character, used in Substitute options, so there is another issue.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Request Help to Resolve player.ini error in Mond Skin

Post by balala »

BearTracks2Nowhere wrote: October 8th, 2021, 4:03 pm The Player.ini generates an endless series of errors stating that it cannot open the 'play.png' file. The path depicted in the error message within the log shows the beginning portion of the file path prepended to the actual path. It is also calling for both 'Play.png' file AND the 'Pause37.png. The log begins generating endless error messages the moment I load 'player.ini'.

Image
As deflore08 says, in the first posted screenshot, the path of those images files are incorrect (you remarked this as well, I believe). Most probably this is caused by the number existing at the end of the name of Pause.png image file (if there indeed is that number). There seems to be a 37, which has nothing to look for there. I suppose (hope?) the real file on the harddrive has no that number added. Please check first to make sure it indeed is not there. And what is the name of the image file showing pause: Pause.png or Pause37.png (as you wrote above)? If it is Pause37.png, replace the Pause.png filename in the Substitute option by Pause37.png: Substitute="0":"#@#Play.png","1":"#@#Pause37.png","2":"#@#Play.png".
If it isn't, try commenting out the Substitute option (adding a semicollon in front of it: ;Substitute=...) of the [MeasureStateButton] and check what is returned by the measure. If you're not sure how to check this, add the following meter to the end of code, refresh the skin and see what is showing up in the upper-left corner of your skin:

Code: Select all

[MeterPlayPauseStop]
Meter=STRING
MeasureName=MeasureStateButton
X=5
Y=5
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1
DynamicVariables=1
Try when the player is playing, when it is paused and when it is stopped. What are returned?
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Contact:

Re: Request Help to Resolve player.ini error in Mond Skin

Post by Active Colors »

balala wrote: October 8th, 2021, 6:42 pm As deflore08 says, in the first posted screenshot, the path of those images files are incorrect (you remarked this as well, I believe). Most probably this is caused by the number existing at the end of the name of Pause.png image file (if there indeed is that number). There seems to be a 37, which has nothing to look for there. I suppose (hope?) the real file on the harddrive has no that number added. Please check first to make sure it indeed is not there. And what is the name of the image file showing pause: Pause.png or Pause37.png (as you wrote above)? If it is Pause37.png, replace the Pause.png filename in the Substitute option by Pause37.png: Substitute="0":"#@#Play.png","1":"#@#Pause37.png","2":"#@#Play.png".
If it isn't, try commenting out the Substitute option (adding a semicollon in front of it: ;Substitute=...) of the [MeasureStateButton] and check what is returned by the measure. If you're not sure how to check this, add the following meter to the end of code, refresh the skin and see what is showing up in the upper-left corner of your skin:

Code: Select all

[MeterPlayPauseStop]
Meter=STRING
MeasureName=MeasureStateButton
X=5
Y=5
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1
DynamicVariables=1
Try when the player is playing, when it is paused and when it is stopped. What are returned?
It is not Pause37.png, it is Pause.png37
37 is a part of his username Bear4137.
The address path strangely repeating.
I can't say where a problem is off-hand.
User avatar
deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City
Contact:

Re: Request Help to Resolve player.ini error in Mond Skin

Post by deflore08 »

Hm, right balala, i am idiot. :))) Sorry buddy. I have though a bit and.. Check out this meter (in Player.ini), and replace if it's incorrect:

Code: Select all

[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
SolidColor=0,0,0,1
ImageTint=#ButtonColor#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]
Also this Player.ini works good for me, in spite of there is some mistakes in syntax.
Player.ini
(4.27 KiB) Downloaded 17 times
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Request Help to Resolve player.ini error in Mond Skin

Post by balala »

Active Colors wrote: October 8th, 2021, 6:57 pm It is not Pause37.png, it is Pause.png37
37 is a part of his username Bear4137.
Ok, but then how the Bear41 became Pause.png?

BearTracks2Nowhere, probably the best would be you to pack the whole config as you have it now and upload the package here. I'd like to check it with the existing code and files.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Request Help to Resolve player.ini error in Mond Skin

Post by SilverAzide »

I think the problem is here, as the OP noted:

Code: Select all

[MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"
You shouldn't do substitution with "#@#", as it's got the full path to the resources folder it, which is causing errors. As AC says, it's replacing part of the username where there are numbers.

Something like this is less prone to errors:

Code: Select all

Substitute="0":"~Play.png","1":"~Pause.png","2":"~Play.png","~":"#@#"
(In other words, ensure the resulting strings for each substitution don't have a chance of having numbers in it that would be affected by the subsequent substitutions.)
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Request Help to Resolve player.ini error in Mond Skin

Post by balala »

SilverAzide wrote: October 8th, 2021, 7:25 pm I think the problem is here, as the OP noted:

Code: Select all

[MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"
You shouldn't do substitution with "#@#", as it's got the full path to the resources folder it, which is causing errors. As AC says, it's replacing part of the username where there are numbers.

Something like this is less prone to errors:

Code: Select all

Substitute="0":"~Play.png","1":"~Pause.png","2":"~Play.png","~":"#@#"
(In other words, ensure the resulting strings for each substitution don't have a chance of having numbers in it.)
Right, reading your reply I just realized what is going on. When a substitution is realized, further substitutions in the same string are also possible. When its playing, the number 1 is substituted by #@#Pause.png, but the path of @Resources folder being C:\Users\Bear4137\Documents\Rainmeter\Skins\Mond\@Resources in this path the 1 is once again substituted by C:\Users\Bear4137\Documents\Rainmeter\Skins\Mond\@Resources\Pause.png. This is why the path of the Pause.png file is interspersed into the path of the same file.
In my view SilverAzide's above solution is somehow complicated. There is a simpler one.
So BearTracks2Nowhere, there is no need anymore to upload the package. The solution is quite simple. The Substitute option option of the [MeasureStateButton] measure has to be replaced by the following two options:

Code: Select all

[MeasureStateButton]
...
RegExpSubstitute=1
Substitute="^0$":"#@#Play.png","^1$":"#@#Pause.png","^2$":"#@#Play.png"
This way the substitution will be made only on the whole string returned by the measure, so if there is a lonely 0 it is replaced by Play.png, a lonely 1 by Pause.png and finally a lonely 2 by Play.png. In other cases (when they are not lonely) these numers are not substituted.
I didn't realized this so far, but now I am sure this is the solution. Sorry, my bad...
User avatar
deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City
Contact:

Re: Request Help to Resolve player.ini error in Mond Skin

Post by deflore08 »

Hahaha! It was so obviously and simple, and that is why it was so hard to find! Thanks fellas, very useful tip!
Post Reply