It is currently May 21st, 2024, 10:14 pm

Refresh on VLC Quit

Get help with creating, editing & fixing problems with skins
User avatar
WandersFar
Posts: 46
Joined: January 25th, 2010, 3:38 pm

Refresh on VLC Quit

Post by WandersFar »

I'd like my Rainmeter skin to refresh automatically whenever I stop playing music. If the skin doesn't refresh once I close my media player (VLC) then my shuffle indicator gets stuck and still displays even though VLC is closed and no music is playing. I can get rid of it by clicking on the skin and refreshing manually, but that's annoying. I'd like Rainmeter to just refresh itself once NowPlugin STATUS=0.

I've tried the following code, which works, but it causes Rainmeter to refresh over and over again whenever a track is playing with a long song title. I think IfEqualValue=0 IfEqualAction=!Refresh is interfering with TrackChangeAction=!Refresh somehow.

[Rainmeter]
Update=500
LeftMouseUpAction=!Refresh

[MeasurePlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=CAD
PlayerType=TITLE
DisableLeadingZero=1
TrackChangeAction=!Refresh

[MeasureStatus]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=STATUS
IfEqualValue=0
IfEqualAction=!Refresh

Any thoughts?

Here's my entire skin, in case there's something relevant I missed in the selection above:

Code: Select all

[Rainmeter]
Update=500
LeftMouseUpAction=!Refresh

[MeasurePlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=CAD
PlayerType=TITLE
DisableLeadingZero=1
TrackChangeAction=!Refresh

[MeasureStatus]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=STATUS
IfEqualValue=0
IfEqualAction=!Refresh

[MeasureShuffle]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=SHUFFLE
Substitute="0":"","1":"*"

[MeasureCover]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=COVER

[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=ARTIST

[MeasurePosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=POSITION
Substitute="0:00":""

[MeasureDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=DURATION
Substitute="0:00":""

[MeasureTime]
Measure=Time
Format=%#I:%M %p
Substitute="AM":"","PM":""

[MeasureDate]
Measure=Time
Format=%d

[MeasureMonth]
Measure=Time
Format=%B
Substitute="J":"j","F":"f","M":"m","A":"a","S":"s","O":"o","N":"n","D":"d"

[MeasureDay]
Measure=Time
Format=%A
Substitute="M":"m","T":"t","W":"w","F":"f","S":"s"

[MeasurePower]
Measure=Plugin
Plugin=PowerPlugin.dll
PowerState=PERCENT
Substitute="100":""

;========================================

[MeterTitle]
MeasureName=MeasurePlayer
Meter=String
X=399
Y=0
FontColor=25,25,25,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterShuffle]
MeasureName=MeasureShuffle
Meter=String
X=364
Y=0
FontColor=25,25,25,80
FontSize=35
FontFace=neuropol x free
AntiAlias=1

[MeterCover]
MeasureName=MeasureCover
Meter=IMAGE
X=0
Y=0
W=215
H=215
Greyscale=1
ImageAlpha=100

[MeterArtist]
MeasureName=MeasureArtist
Meter=String
X=399
Y=20
FontColor=25,25,25,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterPosition]
MeasureName=MeasurePosition
Meter=String
X=239
Y=0
FontColor=25,25,25,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterDuration]
MeasureName=MeasureDuration
Meter=String
X=239
Y=20
FontColor=25,25,25,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterTime]
MeasureName=MeasureTime
Meter=String
X=215
Y=20
W=500
H=100
FontColor=0,0,0,90
FontSize=90
FontFace=neuropol x free
AntiAlias=1

[MeterDate]
MeasureName=MeasureDate
Meter=String
X=235
Y=140
FontColor=50,50,50,70
FontSize=50
FontFace=neuropol x free
AntiAlias=1

[MeterMonth]
MeasureName=MeasureMonth
Meter=String
X=395
Y=140
FontColor=50,50,50,70
FontSize=30
FontFace=neuropol x free
AntiAlias=1

[MeterDay]
MeasureName=MeasureDay
Meter=String
X=399
Y=180
FontColor=50,50,50,70
FontSize=20
FontFace=neuropol x free
AntiAlias=1

[MeterPower]
MeasureName=MeasurePower
Meter=String
X=639
Y=180
FontColor=50,50,50,70
FontSize=20
FontFace=neuropol x free
AntiAlias=1
Last edited by WandersFar on April 18th, 2012, 3:15 pm, edited 2 times in total.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Refresh on VLC Quit

Post by poiru »

Why do you need to refresh? If it is to accommodate space for (longer) text, you could instead try DynamicWindowSize=1 under the [Rainmeter] section.

Also, you will want to use PlayerName=[MeasurePlayer] in all NowPlaying measures (except MeasurePlayer itself).
User avatar
WandersFar
Posts: 46
Joined: January 25th, 2010, 3:38 pm

Re: Refresh on VLC Quit

Post by WandersFar »

poiru wrote:Also, you will want to use PlayerName=[MeasurePlayer] in all NowPlaying measures (except MeasurePlayer itself).
Ah, thanks for catching that. I recently added that and copy pasted the PlayerName from the wrong section.
Why do you need to refresh? If it is to accommodate space for (longer) text, you could instead try DynamicWindowSize=1 under the [Rainmeter] section.
I tried removing TrackChangeAction=!Refresh and IfEqualValue=0 IfEqualAction=!Refresh and just using DynamicWindowSize=1 as you suggested, and now both my song names are cut off and my random indicator persists even after I've closed my media player.

I think I definitely need TrackChangeAction=!Refresh, but IfEqualValue=0 IfEqualAction=!Refresh is what's causing the refresh loop problem. I can't see how DynamicWindowSize=1 makes any difference... adding or removing it doesn't appear to change anything.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Refresh on VLC Quit

Post by poiru »

WandersFar wrote:I tried removing TrackChangeAction=!Refresh and IfEqualValue=0 IfEqualAction=!Refresh and just using DynamicWindowSize=1 as you suggested, and now both my song names are cut off
Are you sure you put DynamicWindowSize=1 under the [Rainmeter] section=
WandersFar wrote:and my random indicator persists even after I've closed my media player.
This is a bug in NowPlaying, which will be fixed in the next beta release this Sunday.
User avatar
WandersFar
Posts: 46
Joined: January 25th, 2010, 3:38 pm

Re: Refresh on VLC Quit

Post by WandersFar »

poiru wrote:Are you sure you put DynamicWindowSize=1 under the [Rainmeter] section
This is my revised skin:

Code: Select all

[Rainmeter]
Update=500
DynamicWindowSize=1
LeftMouseUpAction=!Refresh

[MeasurePlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=CAD
PlayerType=TITLE
DisableLeadingZero=1

[MeasureStatus]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=STATUS

[MeasureShuffle]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=SHUFFLE
Substitute="0":"","1":"*"

[MeasureCover]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=COVER

[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=ARTIST

[MeasurePosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=POSITION
Substitute="0:00":""

[MeasureDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=DURATION
Substitute="0:00":""

[MeasureTime]
Measure=Time
Format=%#I:%M %p
Substitute="AM":"","PM":""

[MeasureDate]
Measure=Time
Format=%d

[MeasureMonth]
Measure=Time
Format=%B
Substitute="J":"j","F":"f","M":"m","A":"a","S":"s","O":"o","N":"n","D":"d"

[MeasureDay]
Measure=Time
Format=%A
Substitute="M":"m","T":"t","W":"w","F":"f","S":"s"

[MeasurePower]
Measure=Plugin
Plugin=PowerPlugin.dll
PowerState=PERCENT
Substitute="100":""

;========================================

[MeterTitle]
MeasureName=MeasurePlayer
Meter=String
X=399
Y=0
FontColor=235,235,235,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterShuffle]
MeasureName=MeasureShuffle
Meter=String
X=364
Y=0
FontColor=235,235,235,80
FontSize=35
FontFace=neuropol x free
AntiAlias=1

[MeterCover]
MeasureName=MeasureCover
Meter=IMAGE
X=0
Y=0
W=215
H=215
Greyscale=1
ImageAlpha=100

[MeterArtist]
MeasureName=MeasureArtist
Meter=String
X=399
Y=20
FontColor=235,235,235,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterPosition]
MeasureName=MeasurePosition
Meter=String
X=239
Y=0
FontColor=235,235,235,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterDuration]
MeasureName=MeasureDuration
Meter=String
X=239
Y=20
FontColor=235,235,235,80
FontSize=15
FontFace=neuropol x free
AntiAlias=1

[MeterTime]
MeasureName=MeasureTime
Meter=String
X=215
Y=20
W=500
H=100
FontColor=255,255,255,90
FontSize=90
FontFace=neuropol x free
AntiAlias=1

[MeterDate]
MeasureName=MeasureDate
Meter=String
X=235
Y=140
FontColor=205,205,205,70
FontSize=50
FontFace=neuropol x free
AntiAlias=1

[MeterMonth]
MeasureName=MeasureMonth
Meter=String
X=395
Y=140
FontColor=205,205,205,70
FontSize=30
FontFace=neuropol x free
AntiAlias=1

[MeterDay]
MeasureName=MeasureDay
Meter=String
X=399
Y=180
FontColor=205,205,205,70
FontSize=20
FontFace=neuropol x free
AntiAlias=1

[MeterPower]
MeasureName=MeasurePower
Meter=String
X=639
Y=180
FontColor=205,205,205,70
FontSize=20
FontFace=neuropol x free
AntiAlias=1
I've put DynamicWindowSize=1 under the [Rainmeter] section and removed the TrackChangeAction and ifEquals statements, but long song titles are still cut off. I have to manually refresh the skin to show the whole song title.

Is it bad for the skin to refresh after every track change? I did notice Rainmeter seems to start up faster if I remove TrackChangeAction=!Refresh but I'm not sure if that's just my perception or an actual effect of that line of code.
This is a bug in NowPlaying, which will be fixed in the next beta release this Sunday.
Oh, okay, good. I'll leave off the IfEquals then, since that only addresses the sticky shuffle indicators.