It is currently April 26th, 2024, 7:37 pm
CountUP (down) timer
-
- Posts: 7
- Joined: May 17th, 2017, 5:57 pm
CountUP (down) timer
Hello i searched whole internet and i couldn't find any day timer which will count days upwards, something like alcohol or smoke timer, i am very bad at coding i only changed some rainmeter parameters like colors lengths so i am very noobish. If some one can help i would very appreciated.
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: CountUP (down) timer
I'm not sure is you thought to something like this: https://forum.rainmeter.net/viewtopic.php?p=96578#p96578
Please let me know if not.
Please let me know if not.
-
- Posts: 7
- Joined: May 17th, 2017, 5:57 pm
Re: CountUP (down) timer
That is one beautiful skin but sadly its not what i meant. I thought the day counter which will count days upwards (i.e. 1Day left, 2 days left, 3 days left etc.) Something like when alcohol addicts count days (1 day sober, 2 days sober...) Thank you very much for interest to help.
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: CountUP (down) timer
Ok, maybe something like this:bowas1984 wrote:That is one beautiful skin but sadly its not what i meant. I thought the day counter which will count days upwards (i.e. 1Day left, 2 days left, 3 days left etc.) Something like when alcohol addicts count days (1 day sober, 2 days sober...) Thank you very much for interest to help.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
Days=0
[MeasureDays]
Measure=Time
Format=%d
OnChangeAction=[!SetVariable Days "(#Days#+1)"][!WriteKeyValue Variables Days "(#Days#+1)"][!UpdateMeter "MeterDays"]
[MeterDays]
Meter=STRING
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=Days: #Days#
DynamicVariables=1
[MeterReset]
Meter=STRING
X=0r
Y=10R
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=Reset
LeftMouseUpAction=[!SetVariable Days "0"][!WriteKeyValue Variables Days "0"]
ToolTipText=Click to reset the number of days
You can reset this value to 0, using the Reset button.
Does this code looks like what you wanted? If so, it can (and must) be improved.
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: CountUP (down) timer
Balala offered a solution...
But if you were looking for something that counts down to a specific date, you could look at these 2 skins:
JSMorley's Countdown to Christmas: https://forum.rainmeter.net/viewtopic.php?f=27&t=24547 skin
Or this Count Down Days skin: https://forum.rainmeter.net/viewtopic.php?f=5&t=21972&hilit=count+down+days
But if you were looking for something that counts down to a specific date, you could look at these 2 skins:
JSMorley's Countdown to Christmas: https://forum.rainmeter.net/viewtopic.php?f=27&t=24547 skin
Or this Count Down Days skin: https://forum.rainmeter.net/viewtopic.php?f=5&t=21972&hilit=count+down+days
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 7
- Joined: May 17th, 2017, 5:57 pm
Re: CountUP (down) timer
@balala
I think that's it! I will test it, day or two then i will come back. Thank you very much again!
@eclectic-tech
Nope that's not it, but thanks for the try.
I am glad that this community is so nice. Thank you all
I think that's it! I will test it, day or two then i will come back. Thank you very much again!
@eclectic-tech
Nope that's not it, but thanks for the try.
I am glad that this community is so nice. Thank you all
-
- Posts: 7
- Joined: May 17th, 2017, 5:57 pm
Re: CountUP (down) timer
Yes that's it! I will try to change it a little, first to make that reset button transparent (show on hover) then we will see. Thank you again, i couldn't find anything similar.
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: CountUP (down) timer
Don't make it transparent, instead hide it. It's easier. Just have to add a Hidden=1 option to the [MeterReset] meter and the following two options to the [Rainmeter] section:bowas1984 wrote:first to make that reset button transparent (show on hover)
Code: Select all
[Rainmeter]
...
MouseOverAction=[!ShowMeter "MeterReset"][!Redraw]
MouseLeaveAction=[!HideMeter "MeterReset"][!Redraw]
-
- Posts: 7
- Joined: May 17th, 2017, 5:57 pm
Re: CountUP (down) timer
Sorry for late reply, i was very busy whole weak
I have one more question, because of some reason the days are updated only when computer is power ON is there any way to count days even if the PC is OFF?
Here is my adjusted code for my skin:
Thanks for all again
I have one more question, because of some reason the days are updated only when computer is power ON is there any way to count days even if the PC is OFF?
Here is my adjusted code for my skin:
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
MouseOverAction=[!ShowMeter "MeterReset"][!Redraw]
MouseLeaveAction=[!HideMeter "MeterReset"][!Redraw]
[Variables]
Days=0
[MeasureDays]
Measure=Time
Format=%d
OnChangeAction=[!SetVariable Days "(#Days#+1)"][!WriteKeyValue Variables Days "(#Days#+1)"][!UpdateMeter "MeterDays"]
[MeterDays]
Meter=STRING
X=12
Y=12
FontColor=0, 230, 255
SolidColor=0,0,0,150
FontSize=20
FontFace=IDroid
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Days: #Days#
DynamicVariables=1
[MeterReset]
Hidden=1
Meter=STRING
X=0r
Y=0R
FontColor=220,220,220,
SolidColor=0,0,0,150
FontSize=8
FontFace=IDroid
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Reset
LeftMouseUpAction=[!SetVariable Days "0"][!WriteKeyValue Variables Days "0"]
ToolTipText=Click to reset the number of days
[MeterTopLine1]
Meter=IMAGE
SolidColor=0, 230, 255
X=0
Y=0
W=66
H=1
Antialias=1
[MeterTopLineMarker1]
Meter=IMAGE
SolidColor=0, 230, 255
X=66
Y=0
W=4
H=3
Antialias=1
[MeterMidLine1]
Meter=IMAGE
SolidColor=72, 209, 204
X=66
Y=3
W=72
H=1
Antialias=1
[MeterLeftLineHigh]
Meter=IMAGE
SolidColor=0, 230, 255
X=0
Y=0
W=1
H=56
Antialias=1
[MeterRightLineLineHigh]
Meter=IMAGE
SolidColor=0, 230, 255
X=138
Y=3
W=1
H=54
Antialias=1
[MeterBottomLine]
Meter=IMAGE
SolidColor=0, 230, 255
X=0
Y=56
W=139
H=1
Antialias=1
-
- Rainmeter Sage
- Posts: 16174
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: CountUP (down) timer
This definitely is not an easy question. Probably it's not impossible, but neither easy isn't.bowas1984 wrote:Sorry for late reply, i was very busy whole weak
I have one more question, because of some reason the days are updated only when computer is power ON is there any way to count days even if the PC is OFF?
So, a quick solution I think would be the following one:
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
MouseOverAction=[!ShowMeter "MeterReset"][!Redraw]
MouseLeaveAction=[!HideMeter "MeterReset"][!Redraw]
[Variables]
Day=152087.88736
[MeasureDate]
Measure=Time
[MeasureDays]
Measure=Calc
Formula=(( [MeasureDate:] / 86400 ) - #Day# )
DynamicVariables=1
[MeterDays]
Meter=STRING
MeasureName=MeasureDays
X=12
Y=12
FontColor=0, 230, 255
SolidColor=0,0,0,150
FontSize=20
FontFace=IDroid
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Days: %1
DynamicVariables=1
[MeterReset]
Hidden=1
Meter=STRING
X=0r
Y=0R
FontColor=220,220,220,
SolidColor=0,0,0,150
FontSize=8
FontFace=IDroid
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Reset
LeftMouseUpAction=[!WriteKeyValue Variables Day "([MeasureDate:]/86400)"][!Refresh]
ToolTipText=Click to reset the number of days
[MeterTopLine1]
Meter=IMAGE
SolidColor=0, 230, 255
X=0
Y=0
W=66
H=1
Antialias=1
[MeterTopLineMarker1]
Meter=IMAGE
SolidColor=0, 230, 255
X=66
Y=0
W=4
H=3
Antialias=1
[MeterMidLine1]
Meter=IMAGE
SolidColor=72, 209, 204
X=66
Y=3
W=72
H=1
Antialias=1
[MeterLeftLineHigh]
Meter=IMAGE
SolidColor=0, 230, 255
X=0
Y=0
W=1
H=56
Antialias=1
[MeterRightLineLineHigh]
Meter=IMAGE
SolidColor=0, 230, 255
X=138
Y=3
W=1
H=54
Antialias=1
[MeterBottomLine]
Meter=IMAGE
SolidColor=0, 230, 255
X=0
Y=56
W=139
H=1
Antialias=1
Please run this code for a few days and let me know if it works properly. I didn't test it, so I'm not sure how will it.