It is currently April 18th, 2024, 6:55 pm

[bug] String Value Is Not Paused/Disabled

Report bugs with the Rainmeter application and suggest features.
oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

[bug] String Value Is Not Paused/Disabled

Post by oZone »

When I pause/disable measure NowPlaying with PlayerType=Position, number value is paused/disabled but string not.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: [bug] String Value Is Not Paused/Disabled

Post by CyberTheWorm »

post your code so we can help
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [bug] String Value Is Not Paused/Disabled

Post by balala »

No need to post any code. Disabling measures don't affect their string values just their numeric values, which turn to zero. Rainmeter always worked this way (at least since I'm using it):

Code: Select all

[MeasureString]
Measure=String
String=My string
Disabled=1

[MeterString]
Meter=STRING
MeasureName=MeasureString
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1
DynamicVariables=1
LeftMouseUpAction=[!ToggleMeasure "MeasureString"]
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [bug] String Value Is Not Paused/Disabled

Post by jsmorley »

oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: [bug] String Value Is Not Paused/Disabled

Post by oZone »

So it's normal that string value is still updating.

Edit:
Pause/disable won't work on string value for subsequent NowPlaying measures if first NowPlaying measure is not paused/disabled.

Also pausing/disabling first NowPlaying measure will pause/disable subsequent NowPlaying measures.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [bug] String Value Is Not Paused/Disabled

Post by balala »

oZone wrote:So it's normal that string value is still updating.
No, if the measure is disabled / paused it doesn't update, as you can read in the link posted by jsmorley.
oZone wrote:pausing/disabling first NowPlaying measure will pause/disable subsequent NowPlaying measures.
No, probably won't, but if the parent (you named it first) measure is disabled (paused) it doesn't update and as such, no child measure doesn't update. These aren't the same at all...
oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: [bug] String Value Is Not Paused/Disabled

Post by oZone »

balala wrote:No, if the measure is disabled / paused it doesn't update, as you can read in the link posted by jsmorley.
So if I use the code below, string values should remain same as below values. But after starting playing song every string values except from mProgress and mPlayer (which is correct, as it's not paused and should not change) change.
mPlayer - 1
mTitle - N/A
mArtist - N/A
mAlbum - N/A
mDuration - 00:00
mPosition - 00:00
mProgress - 0

I am trying to understand how Disabled=1 and Paused=1 do work. Because when I pause/disable other "non-NowPlaying" measures everything is paused/disabled and values are not updated.

Code: Select all

[Variables]
media.Player=

[mPlayer]
Measure=NowPlaying
PlayerName=#media.Player#
PlayerType=Status

[mTitle]
Measure=NowPlaying
PlayerName=[mPlayer]
PlayerType=Title
Substitute="":"N/A"
Paused=1

[mArtist]
Measure=NowPlaying
PlayerName=[mPlayer]
PlayerType=Artist
Substitute="":"N/A"
Paused=1

[mAlbum]
Measure=NowPlaying
PlayerName=[mPlayer]
PlayerType=Album
Substitute="":"N/A"
Paused=1

[mDuration]
Measure=NowPlaying
PlayerName=[mPlayer]
PlayerType=Duration
Paused=1

[mPosition]
Measure=NowPlaying
PlayerName=[mPlayer]
PlayerType=Position
Paused=1

[mProgress]
Measure=NowPlaying
PlayerName=[mPlayer]
PlayerType=Progress
Paused=1
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [bug] String Value Is Not Paused/Disabled

Post by balala »

oZone wrote:So if I use the code below, string values should remain same as below values. But after starting playing song every string values except from mProgress and mPlayer (which is correct, as it's not paused and should not change) change.
mPlayer - 1
mTitle - N/A
mArtist - N/A
mAlbum - N/A
mDuration - 00:00
mPosition - 00:00
mProgress - 0
In your code [mTitle], [mArtist], [mAlbum], [mDuration], [mPosition] and [mProgress] are child measures and they probably follow the parent measure (which in this case is the [mPlayer] measure). That one being not paused, the child measures will also work, even if they are paused.
If you try to pause the parent measure ([mPlayer]) and un-pause all its child measures (removing the Paused=1 option), they won't work, although they aren't paused.
oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: [bug] String Value Is Not Paused/Disabled

Post by oZone »

balala wrote:In your code [mTitle], [mArtist], [mAlbum], [mDuration], [mPosition] and [mProgress] are child measures and they probably follow the parent measure (which in this case is the [mPlayer] measure). That one being not paused, the child measures will also work, even if they are paused.
If you try to pause the parent measure ([mPlayer]) and un-pause all its child measures (removing the Paused=1 option), they won't work, although they aren't paused.
Ok so child measures which return different numerical and string value will ignore Paused=1 or Disabled=1 option for string value and will update them, because they follow parent measure.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [bug] String Value Is Not Paused/Disabled

Post by jsmorley »

oZone wrote:Ok so child measures which return different numerical and string value will ignore Paused=1 or Disabled=1 option for string value and will update them, because they follow parent measure.
The way to envision this is that the parent measure actually sets the value for child measures when it updates, and nothing having to do with UpdateDivider, Disabled or Paused has any effect on a child measure.