It is currently March 29th, 2024, 11:01 am

remaining h/m/s how to?

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: remaining h/m/s how to?

Post by balala »

jsmorley wrote: October 22nd, 2019, 5:49 pm This WILL work... Trust me.
Not needed to useless complicate things in my opinion. The [MeasureHoursRemaining], [MeasureMinutesRemaining] and [MeasureSecondsRemaining] measures might be replaced by one single measure, for instance the following one:

Code: Select all

[MeasureHoursRemaining]
Measure=Uptime
SecondsValue=([MeasureDuration:] - [MeasurePosition:])
Format=%3!i! Hours, %2!02i! Minutes, %1!02i! Seconds
DynamicVariables=1
With this the String meter would be a little bit simpler as well:

Code: Select all

[MeterOutput]
Meter=String
MeasureName=MeasureHoursRemaining
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: remaining h/m/s how to?

Post by jsmorley »

balala wrote: October 22nd, 2019, 6:11 pm Not needed to useless complicate things in my opinion. The [MeasureHoursRemaining], [MeasureMinutesRemaining] and [MeasureSecondsRemaining] measures might be replaced by one single measure, for instance the following one:

Code: Select all

[MeasureHoursRemaining]
Measure=Uptime
SecondsValue=([MeasureDuration:] - [MeasurePosition:])
Format=%3!i! Hours, %2!02i! Minutes, %1!02i! Seconds
DynamicVariables=1
With this the String meter would be a little bit simpler as well:

Code: Select all

[MeterOutput]
Meter=String
MeasureName=MeasureHoursRemaining
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1

Sure, I was just trying to be thorough, and give the flexibility to have the various components of the time be in different meters or formatted differently or whatever was needed.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: remaining h/m/s how to?

Post by balala »

dvo wrote: October 22nd, 2019, 6:06 pm i'm getting nuts of it .... O.O i got a mess and i see 1:30:00 doesn't count any more .... :D
post of JS is counting something not what it had to but it's counting i don't need uptime i need webnowplayer to count....
If you're talking about my code, this is normal, because that measure converts 90 minutes to an HH:MM:SS format, but this is all. You have to replace in the SecondsValue option 90 with the number of minutes which you want to convert to string format.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: remaining h/m/s how to?

Post by balala »

jsmorley wrote: October 22nd, 2019, 6:12 pm Sure, I was just trying to be thorough, and give the flexibility to have the various components of the time be in different meters or formatted differently or whatever was needed.
Ah, alright, in this case. Sorry if i tried to overcomplicate things.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: remaining h/m/s how to?

Post by jsmorley »

The Uptime measure(s) ARE interacting with WebNowPlaying, and returning the number of seconds "remaining" in the song, formatted into Hours/Minutes/Seconds.

Code: Select all

[Rainmeter]
Update=200
DynamicWindowSize=1
AccurateText=1

[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Position

[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Duration

[MeasureHoursRemaining]
Measure=Uptime
SecondsValue=([MeasureDuration:] - [MeasurePosition:])
Format=%3!i!
DynamicVariables=1

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

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

[MeterOutput]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=[MeasureHoursRemaining] Hours, [MeasureMinutesRemaining] Minutes, [MeasureSecondsRemaining] Seconds

This DOES work with WebNowPlaying, and I assume that it is more or less what you are going for.

Understand, UpTime can do two distinct things. 1) If no SecondsValue is defined, then it measures the amount of time since your PC was rebooted. 2) if SecondsValue is defined, it uses that number of seconds, and can be used to format seconds into weeks/days/hours/minutes/seconds as desired.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: remaining h/m/s how to?

Post by balala »

dvo wrote: October 22nd, 2019, 6:17 pm i don't need any uptime you didn't balala some one made a mess....add this add that do ...
Ok, pack please your config and upload here the package.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: remaining h/m/s how to?

Post by balala »

dvo wrote: October 22nd, 2019, 6:41 pm i got working now
You got it? Alright then...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: remaining h/m/s how to?

Post by balala »

dvo wrote: October 22nd, 2019, 7:01 pm not yet they are starting with 0:20:0 how to change it to 00:20:00
Just replace in the Format options of the [MeasureHoursRemaining], [MeasureMinutesRemaining] and [MeasureSecondsRemaining] measures !i! with i02i:

Code: Select all

[MeasureHoursRemaining]
...
Format=%3!02i!
...

[MeasureMinutesRemaining]
...
Format=%2!02i!
...

[MeasureSecondsRemaining]
...
Format=%1!02i!
...