It is currently April 19th, 2024, 6:59 pm

Request Help to Resolve player.ini error in Mond Skin

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16145
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, 8:25 pm It was so obviously and simple, and that is why it was so hard to find!
Completely agree. As said I should have been realizing this from the beginning, but didn't.
User avatar
deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City

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

Post by deflore08 »

balala wrote: October 8th, 2021, 8:31 pm Completely agree. As said I should have been realizing this from the beginning, but didn't.
Yeah! It's kind of "negative geniously things", where it's geniously, but it is a bug. :))))
Image * Image * Image * Image
User avatar
BearTracks2Nowhere
Posts: 8
Joined: October 8th, 2021, 3:56 pm

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

Post by BearTracks2Nowhere »

Firstly, thanks to all of you for helping me with this. I very much appreciate it.

I changed the line, as advised, to the following:

Code: Select all

MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"Play.png","1":"Pause.png","2":"Play.png"
That error no longer shows in the Rainmeter error log.

The only issue that I am noticing now, is that the progress bar, time elapsed and time remaining are not working at all. Both values remain at zero, and the bar itself does not display progress. I am pasting the pertinent lines below. Does anything stand out that would explain this?? I am still struggling to understand the code, and I am limping... I don't really have a good understanding thus far, so nothing really jumps out to me as being incorrect.

Code: Select all

[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

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

Post by Active Colors »

BearTracks2Nowhere wrote: October 9th, 2021, 1:55 pm Firstly, thanks to all of you for helping me with this. I very much appreciate it.

I changed the line, as advised, to the following:

Code: Select all

MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"Play.png","1":"Pause.png","2":"Play.png"
That error no longer shows in the Rainmeter error log.

The only issue that I am noticing now, is that the progress bar, time elapsed and time remaining are not working at all. Both values remain at zero, and the bar itself does not display progress. I am pasting the pertinent lines below. Does anything stand out that would explain this?? I am still struggling to understand the code, and I am limping... I don't really have a good understanding thus far, so nothing really jumps out to me as being incorrect.

Code: Select all

[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
I don't see anything wrong. But I do nit know regxp and the problem could possibly be there. You can try commenting out the Substitute lines and see if that makes any change.

I would also like to see the meters of the bar and the strings.
User avatar
balala
Rainmeter Sage
Posts: 16145
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 9th, 2021, 1:55 pm That error no longer shows in the Rainmeter error log.
And not the image of the button either, probably. Unless you've moved the Pause.png and Play.png image files near the skins .ini file. Unfortunately this is not a real solution, even if it does work, because the @Resources folder should contain all needed resources (images for instance).
Recommend you to try moving the images back to @Resources (if they indeed have been moved) and apply the solution proposed here.
BearTracks2Nowhere wrote: October 9th, 2021, 1:55 pm The only issue that I am noticing now, is that the progress bar, time elapsed and time remaining are not working at all. Both values remain at zero, and the bar itself does not display progress. I am pasting the pertinent lines below. Does anything stand out that would explain this?? I am still struggling to understand the code, and I am limping... I don't really have a good understanding thus far, so nothing really jumps out to me as being incorrect.

Code: Select all

[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
Same way as Active Colors, I don't see how the [MeasureStateButton] measure could affect the calculation of elapsed and remaining time, but obviously there might be something we don't know about. Accordingly I'm asking you again to post the whole code of your skin.
Additionally there is no need to caluclate the remaining minutes and seconds. There is a much simpler solution, using an Uptime measure. If you post the code, I'm gonna take a look to this as well.
User avatar
BearTracks2Nowhere
Posts: 8
Joined: October 8th, 2021, 3:56 pm

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

Post by BearTracks2Nowhere »

Posting 'player.ini' from Mond skin, as requested;

Code: Select all

[Rainmeter]
Update=100
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]

[Variables]
@include=#@#Variables.inc
Scale=2.1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""

[MeasureTitle]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""

[MeasureAlbum]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=ALBUM
Substitue="":""

[MeasureProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=PROGRESS

[MeasureDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=DURATION

[MeasurePosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=POSITION

[MeasureStateButton]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=#Player#
PlayerType=STATE
RegExpSubstitute=1
Substitute="^0$":"#@#Play.png","^1$":"#@#Pause.png","^2$":"#@#Play.png"

[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(15*#Scale#)
Text="%1"
AntiAlias=1

[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(8*#Scale#)r
Text="%1"
AntiAlias=1

[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=Quicksand
FontColor=#TextColor#
FontSize=(4*#Scale#)
X=(10*#Scale#)
Y=(2.5*#Scale#)
Text="%1"
AntiAlias=1

[MeterPosition]
Meter=String
MeasureName=MeasureMinutesRemaining
MeasureName2=MeasureSecondsRemaining
StringAlign=Center
FontFace=Quicksand
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(185*#Scale#)
Y=(2.5*#Scale#)
Text="-%1:%2"
AntiAlias=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterBar]
Meter=Shape
X=(23*#Scale#)
Y=(5*#Scale#)
Shape=Rectangle 0,0,(150*#Scale#),(1*#Scale#),0 | Fill Color #Color1#,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.5*#Scale#),(1*#Scale#),0 | Fill Color #Color1# | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(1.2*#Scale#) |Fill Color #Color1# | StrokeWidth 0
Shape4=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(3.4*#Scale#) |Fill Color #Color1#,50 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterPrevious]
Meter=Image
ImageName=#@#Previous.png
X=(69*#Scale#)
Y=(35*#Scale#)
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Previous"]

[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
SolidColor=0,0,0,1
ImageTint=#Color2#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]

[MeterNext]
Meter=Image
ImageName=#@#Next.png
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Next"]
User avatar
balala
Rainmeter Sage
Posts: 16145
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 9th, 2021, 6:00 pm Posting 'player.ini' from Mond skin, as requested;
Ok, I rewrote a few thing in your code, here is the result:

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]

[Variables]
@include=#@#Variables.inc
Scale=2.1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureArtist]
Measure=NowPlaying
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""

[MeasureTitle]
Measure=NowPlaying
PlayerName=[MeasureArtist]
PlayerType=TITLE
Substitue="":""

[MeasureAlbum]
Measure=NowPlaying
PlayerName=[MeasureArtist]
PlayerType=ALBUM
Substitue="":""

[MeasureProgress]
Measure=NowPlaying
PlayerName=[MeasureArtist]
PlayerType=PROGRESS

[MeasureDuration]
Measure=NowPlaying
PlayerName=[MeasureArtist]
PlayerType=DURATION

[MeasurePosition]
Measure=NowPlaying
PlayerName=[MeasureArtist]
PlayerType=POSITION

[MeasureStateButton]
Measure=NowPlaying
PlayerName=[MeasureArtist]
PlayerType=STATE
RegExpSubstitute=1
Substitute="^0$":"#@#Play.png","^1$":"#@#Pause.png","^2$":"#@#Play.png"

[MeasureRemaining]
Measure=Uptime
Format=%2!02i!:%1!02i!
SecondsValue=([MeasureDuration:]-[MeasurePosition:])
DynamicVariables=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(15*#Scale#)
Text=%1
AntiAlias=1

[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(8*#Scale#)r
Text=%1
AntiAlias=1

[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=Quicksand
FontColor=#TextColor#
FontSize=(4*#Scale#)
X=(10*#Scale#)
Y=(2.5*#Scale#)
Text=%1
AntiAlias=1

[MeterPosition]
Meter=String
MeasureName=MeasureRemaining
StringAlign=Center
FontFace=Quicksand
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(185*#Scale#)
Y=(2.5*#Scale#)
Text=-%1
AntiAlias=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterBar]
Meter=Shape
X=(23*#Scale#)
Y=(5*#Scale#)
Shape=Rectangle 0,0,(150*#Scale#),(1*#Scale#),0 | Fill Color #Color1#,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.5*#Scale#),(1*#Scale#),0 | Fill Color #Color1# | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(1.2*#Scale#) |Fill Color #Color1# | StrokeWidth 0
Shape4=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(3.4*#Scale#) |Fill Color #Color1#,50 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterPrevious]
Meter=Image
ImageName=#@#Previous.png
X=(69*#Scale#)
Y=(35*#Scale#)
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!CommandMeasure "MeasureArtist" "Previous"]

[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
SolidColor=0,0,0,1
ImageTint=#Color2#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureArtist" "PlayPause"]

[MeterNext]
Meter=Image
ImageName=#@#Next.png
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!CommandMeasure "MeasureArtist" "Next"]
Note a few things:
  • I increased the Update value in the [Rainmeter] section to the default Update=1000 (instead of the existing Update=100). I don't see anything which requires the Update to be set so low as it was.
  • Even if a while ago, Now Playing was a plugin, in meantime it became an internal measure and should be treated so. Accordingly I rewrote the Measure=Plugin and Plugin=NowPlaying.dll option pairs to Measure=NowPlaying. This is enough.
  • The best way to use the NowPlaying measures is to have a parent - child structure. This means that one of those measures has to be the parent measure (in my code this is the [MeasureArtist] measure) and the others have to be the child measures (in this case all other NowPlaying measures). The child measures are referencing the parent measure (by their PlayerName=[MeasureArtist] option), while the parent measure is refrencing directly the player, through its PlayerName=#Player# option.
  • As said no need for the [MeasureMinutesRemaining] and [MeasureSecondsRemaining] measures. As you can see in the above code, I replaced both with the [MeasureRemaining] Uptime measure, which returns the remaining time directly formated as minutes:seconds. Much simpler.
  • In the LeftMouseupAction options of the [MeterPrevious] and [MeterNext] meters, you've used deprecated !PluginBang bangs, while in the [MeterPlayPause] meter the new !CommandMeasure bang. Not sure why, but I replaced the deprecated bangs with !CommandMeasure.
Not having the involved resources (the images, the Variables.inc file and so on), I couldn't try out the code, but I hope there is nothing wrong with it. Please try it and let me know if there is any issue.
User avatar
BearTracks2Nowhere
Posts: 8
Joined: October 8th, 2021, 3:56 pm

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

Post by BearTracks2Nowhere »

Thank you for this. The player works, and no errors show on the log when using this code, however, the progress bar does not move, and the numbers on time elapsed, and time remaining remain at zero. The progress bar simply does not work.
User avatar
balala
Rainmeter Sage
Posts: 16145
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 10th, 2021, 11:48 am Thank you for this. The player works, and no errors show on the log when using this code, however, the progress bar does not move, and the numbers on time elapsed, and time remaining remain at zero. The progress bar simply does not work.
Ok, please pack the whole config and upload the package here. I'd like to take a look having all involved resources.
User avatar
BearTracks2Nowhere
Posts: 8
Joined: October 8th, 2021, 3:56 pm

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

Post by BearTracks2Nowhere »

>> "Ok, please pack the whole config and upload the package here. I'd like to take a look having all involved resources."

I do realize how ignorant this makes me appear; I don't actually understand what that process entails. What is it that you are asking me to do, please?? ( I hope you will excuse my lack of knowledge - I am very new to Rainmeter )