It is currently September 10th, 2024, 11:00 pm

Simple countdown timer

Get help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 1631
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

:welcome:
Last edited by sl23 on September 6th, 2024, 6:29 pm, edited 2 times in total.
57686174 77696C6C 6265 77696C6C 6265
User avatar
Yincognito
Rainmeter Sage
Posts: 8071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

sl23 wrote: August 4th, 2021, 9:57 am Sorry, it's not perfect but hopefully this version is an improvement?
Once you press "Play" the "Pause" button shows. Once the mouse leaves and goes over the skin again, all buttons show. I don't like it, but Personally I don't want all the buttons showing all the time.
Press "Pause" or "Reset" to stop the alarm. Sorry, I thought that would be obvious? :oops:

It's a shame that IfConditions can't be used on a meter as that would easily solve the problem.

Well, for what it's worth here's the latest...
ClockTimer_2021.8.4.rmskin

I've added the skin I use as a "Screensaver" when running emulators, n case anyone likes the idea. If not just delete it.
I guess the previous replies were made from a regular user POV, where he might be confused about the hide/show patterns in the skin - this is something to consider when releasing a skin. Other than that, nobody forces you to do something you don't like, it's your skin and you design it as you see fit. I like it one way, death.crafter likes it another way, you like it yet another way, but in the end the author has the last word. If it's functional and does what it's supposed to do, the rest are just opinions.

Regarding whether it's an improvement or not:
- the play button is not hidden when starting the timer, mouse leaving the play button or skin, then mouse over it again:
Timer.jpg
- regarding the hide / show patterns, I think my biggest problem is that I don't know when is the alarm set at and what time is the timer set on; they don't have to be shown at all times, but to show them - even if it's in a "faded" color - when hovering the related buttons (i.e. not just on pressing play or right clicking on the circle at the left) would be nice, otherwise from my POV is like walking blindfolded; anyway, like I said, you don't have to do it like that, it's just my opinion, putting myself in the shoes of a random user who wants to use your skin
- also, the timer text is a bit off the left circle and rounded rectangle on the right's bottom edges; the symmetrical individual in me would like either the center part a bit more upwards so that it expands equally up and down compared to the left and right parts, or, alternatively, making the left and right parts slightly bigger in order to match the center part

Other than that, you fixed the timer being temporarily 0 on reset, so that part is alright, IMHO. ;-)
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1631
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

:welcome:
Last edited by sl23 on September 6th, 2024, 6:29 pm, edited 1 time in total.
57686174 77696C6C 6265 77696C6C 6265
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: Simple countdown timer

Post by death.crafter »

I would like it like this:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!PauseMeasureGroup Timer]

[Variables]
; The time at which the timer / stopwatch is set or reset, in seconds (>0 for a timer, 0 for a stopwatch)
DefaultSeconds=10
DefaultMinutes=0
DefaultHours=0

AlarmBool=1
AlarmHours=2
AlarmMinutes=53

;Action
TimerAction=Play_sound

;CustomActions
Play_sound=[Play "#@#Calligraphy.wav"]

; Background's stroke colors (0 = mouse leave color, 1 = mouse hover color)
StrokeColor0=255,255,255,60
StrokeColor1=0,255,255,255
StrokeColorIndex=0

TextHighlightColor=0,240,20

HourColour=255,100,100,255
MinuteColour=255,170,0,255
SecondColour=128,255,0,255
TimerColor=100,100,200

; Seconds left to pass (for a timer), or seconds passed (for a stopwatch)
Seconds=([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)

; The amount of seconds by which the timer / stopwatch changes (<0 for a timer, >0 for a stopwatch)
Direction=-1

; Temporarily set to 1 when the timer / stopwatch is reset so the OnChangeAction below doesn't alter the Seconds above
Reset=0

Color1=255,255,255,200
Color2=128,255,0
Color3=255,255,0

;Do not touch
ResetAct=[!SetVariable Seconds "([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)"][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0]
WriteAll=[!WriteKeyValue Variables DefaultHours "[#*DefaultHours*]"][!WriteKeyValue Variables DefaultMinutes "[#*DefaultMinutes*]"][!WriteKeyValue Variables DefaultSeconds "[#*DefaultSeconds*]"][!WriteKeyValue Variables AlarmHours "[#*AlarmHours*]"][!WriteKeyValue Variables AlarmMinutes "[#*AlarmMinutes*]"]

[Shapes]
Meter=Shape
X=0
;Outer circle
Shape=Ellipse 31,31,30,30 | Fill Color 0,0,0,80 | StrokeWidth 2 | Stroke Color [#StrokeColor[#StrokeColorIndex]]
;Inner circle
Shape2=Ellipse 31,31,20,20 | Fill Color 0,0,0,60 | StrokeWidth 2 | Stroke Color [#StrokeColor[#StrokeColorIndex]]
;Line
Shape3=Line 62,31,193,31 | StrokeWidth 2 | Stroke Color [#StrokeColor0]
;Buttons box
Shape4=Rectangle 193,1,28,60,14 | Fill Color 0,0,0,130 | StrokeWidth 2 | Stroke Color [#StrokeColor0]


;-------------------------------------
;MeterStyles
;-------------------------------------
[Icons]
FontFace=Segoe MDL2 Assets
FontSize=9
FontWeight=500
FontColor=255,255,255
StringAlign=CenterCenter
AntiAlias=1

;-------------------------------------
;Time
;-------------------------------------
[Time.Hour]
Measure=Time
Format=%I

[Time.Minute]
Measure=Time
Format=%M

[Time.Second]
Measure=Time
Format=%S

[Time.Date]
Measure=Time
Format=%a, %#d %b

[Alarm.Main]
Measure=Time
Format=%#H:%#M
IfMatch=#AlarmHours#:#AlarmMinutes#
IfMatchAction=[Play "#@#Alarm.wav"]
Disabled=(1-#AlarmBool#)
DynamicVariables=1

[Time.Analog]
Meter=Shape
;Hour line
Shape=Line (31+21*cos(rad(-90+[Time.Hour]*360/12))),(31+21*sin(rad(-90+[Time.Hour]*360/12))),(31+29*cos(rad(-90+[Time.Hour]*360/12))),(31+29*sin(rad(-90+[Time.Hour]*360/12))) | StrokeWidth 3.5 | Stroke Color #HourColour#
;Minute line
Shape2=Line (31+21*cos(rad(-90+[Time.Minute]*360/60))),(31+21*sin(rad(-90+[Time.Minute]*360/60))),(31+29*cos(rad(-90+[Time.Minute]*360/60))),(31+29*sin(rad(-90+[Time.Minute]*360/60))) | StrokeWidth 3 | Stroke Color #MinuteColour#
;Second line
Shape3=Line (31+21*cos(rad(-90+[Time.Second]*360/60))),(31+21*sin(rad(-90+[Time.Second]*360/60))),(31+29*cos(rad(-90+[Time.Second]*360/60))),(31+29*sin(rad(-90+[Time.Second]*360/60))) | StrokeWidth 2 | Stroke Color #SecondColour#

DynamicVariables=1
Group=Main | Time

[Time.Digital]
Meter=String
X=127
Y=3
MeasureName=Time.Hour
MeasureName2=Time.Minute
MeasureName3=Time.Date
Text=%1:%2#CRLF#%3
FontSize=16
FontFace=Segoe UI
FontWeight=600
FontColor=255,255,255
AntiAlias=1
StringAlign=Center
InlinePattern=#CRLF#(.*)
InlineSetting=Size | 9
InlinePattern2=(.*)#CRLF#
InlineSetting2=CharacterSpacing | 1.5
Group=Main | Time

;----------------------------------------
;Timer
;----------------------------------------
[Timer.Main]
Measure=Time
Format=%S
OnChangeAction=[!SetVariable Seconds (#Seconds#+#Direction#*(1-#Reset#))]
DynamicVariables=1
Group=Timer

[Timer.Uptime]
Measure=Uptime
SecondsValue=#Seconds#
Format=%3!02i!:%2!02i! %1!02i!
MaxValue=([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)
IfCondition=(#CURRENTSECTION#<=0) && (Sgn(#Direction#)=-1) && (#Reset#=0)
IfTrueAction=[!PauseMeasureGroup Timer][#[#TimerAction]][#ResetAct][!ShowMeterGroup Main][!HideMeterGroup Timer][!Redraw]
IfConditionMode=1
DynamicVariables=1
Group=Timer

[Timer.Play]
Meter=String
MeterStyle=Icons
Text=[\xE768]
X=207
Y=14
Group=Main
LeftMouseUpAction=[!HideMeterGroup Main][!ShowMeterGroup Timer][!Redraw][!UnpauseMeasureGroup Timer]

[Timer.Pause]
Meter=String
MeterStyle=Icons
Text=[\xE769]
X=207
Y=14
Group=Main | Timer
Hidden=1
LeftMouseUpAction=[!PauseMeasureGroup Timer][!ShowMeterGroup Main][!HideMeterGroup Timer][!Redraw]

[Timer.Reset]
Meter=String
MeterStyle=Icons
Text=[\xE72C]
X=207
Y=48
Group=Main | Timer
Hidden=1
LeftMouseUpAction=[#ResetAct][!UpdateMeter Timer.Digital][!HideMeter Timer.Pause][!ShowMeter Timer.Play][!Redraw]

[Timer.Analog]
Meter=RoundLine
X=31
Y=31
MeasureName=Timer.Uptime
LineStart=21
LineLength=29
LineWidth=2
StartAngle=(Rad(270))
Antialias=1
Solid=1
LineColor=#TimerColor#
LineWidth=5
Group=Main | Timer
Hidden=1

[Timer.Digital]
Meter=String
X=127
Y=3
MeasureName=Timer.Uptime
MeasureName2=Time.Hour
MeasureName3=Time.Minute
Text=%1#CRLF##TimerAction# • %2:%3
FontSize=16
FontFace=Segoe UI
FontWeight=600
FontColor=255,255,255
AntiAlias=1
StringAlign=Center
InlinePattern=^.*(\s.*)#CRLF#
InlineSetting=Size | 10
InlinePattern2=^.*(\s.*)#CRLF#
InlineSetting2=Weight | 700
InlinePattern3=#CRLF#(.*)
InlineSetting3=Size | 9
InlinePattern3=(.*)#CRLF#
InlineSetting3=CharacterSpacing | 1.5
Group=Main | Timer
Hidden=1

;--------------------------------------
;Settings
;--------------------------------------
[Settings.ActionTimer]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Show,2,20
ActionList2=Repeat Hide,2,20
Show=[!SetVariable Animation "(Clamp(#Animation#+0.05, 0, 1))"][!UpdateMeterGroup Animation][!UpdateMeasure Settings.ActionTimer][!Redraw]
Hide=[!SetVariable Animation "(Clamp(#Animation#-0.05, 0, 1))"][!UpdateMeterGroup Animation][!UpdateMeasure Settings.ActionTimer][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[Settings.Icon]
Meter=String
MeterStyle=Icons
Text=[\xE713]
X=207
Y=48
Group=Main
LeftMouseUpAction=[#ResetAct][!UpdateMeter Settings.Timer.Digital][!HideMeterGroup Main][!ShowMeterGroup Settings][!HideMeterGroup AlarmSettings][!Redraw]

[Settings.Done]
Meter=String
MeterStyle=Icons
Text=[\xE73E]
X=207
Y=31
Group=Settings
DynamicVariables=1
Hidden=1
LeftMouseUpAction=[#WriteAll][!HideMeterGroup Settings][!ShowMeterGroup Main][!HideMeterGroup Timer][!Redraw]

[Settings.Timer]
Meter=String
MeterStyle=Icons
Text=[\xE823]
X=207
Y=14
Group=Settings
Hidden=1
LeftMouseUpAction=[!HideMeterGroup AlarmSettings][!ShowMeterGroup TimerSettings][!Redraw]

[Settings.Alarm]
Meter=String
MeterStyle=Icons
Text=[\xEA8F]
X=207
Y=48
Group=Settings
Hidden=1
LeftMouseUpAction=[!HideMeterGroup TimerSettings][!ShowMeterGroup AlarmSettings][!Redraw]

[Settings.Timer.Digital]
Meter=String
MeterStyle=Timer.Digital
Text=%1#CRLF#
InlinePattern4=^$
InlineSetting4=Color | #TextHighlightColor#
DynamicVariables=1
Group=Settings | TimerSettings

[Settings.Timer.Hours]
Meter=Image
SolidColor=0,0,0,1
MouseOverAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^(\d{2})"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable DefaultHours "([#DefaultHours]=99 ? 0 : [#DefaultHours]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable DefaultHours "([#DefaultHours]=0 ? 99 : [#DefaultHours]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
DynamicVariables=1
Hidden=1
Group=Settings | TimerSettings
H=25
W=25
X=-36r
Y=r

[Settings.Timer.Minutes]
Meter=Image
MeterStyle=Settings.Timer.Hours
MouseOverAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^.*:(\d{2})"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable DefaultMinutes "([#DefaultMinutes]=59 ? 0 : [#DefaultMinutes]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable DefaultMinutes "([#DefaultMinutes]=0 ? 59 : [#DefaultMinutes]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
X=4R

[Settings.Timer.Seconds]
Meter=Image
MeterStyle=Settings.Timer.Hours
MouseOverAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^.*\s(\d{2})"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable DefaultSeconds "([#DefaultSeconds]=59 ? 0 : [#DefaultSeconds]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable DefaultSeconds "([#DefaultSeconds]=0 ? 59 : [#DefaultSeconds]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
H=22
X=2R
Y=3r

[Settings.Alarm.Uptime]
Measure=Uptime
SecondsValue=(#AlarmHours#*3600+#AlarmMinutes#*60)
Format=%3!02i!:%2!02i!
DynamicVariables=1

[Settings.Alarm.Digital]
Meter=String
MeasureName=Settings.Alarm.Uptime
Text=%1#CRLF#
MeterStyle=Time.Digital
Hidden=1
InlinePattern4=^$
InlineSetting4=Color | #TextHighlightColor#
DynamicVariables=1
Group=Settings | AlarmSettings

[Settings.Alarm.Hours]
Meter=Image
SolidColor=0,0,0,1
MouseOverAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^(\d{2})"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable AlarmHours "([#AlarmHours]=23 ? 0 : [#AlarmHours]+1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollDownAction=[!SetVariable AlarmHours "([#AlarmHours]=0 ? 23 : [#AlarmHours]-1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
DynamicVariables=1
Hidden=1
Group=Settings | AlarmSettings
H=25
W=25
X=(-[Settings.Alarm.Digital:W]/2+3)r
Y=r

[Settings.Alarm.Minutes]
Meter=Image
MeterStyle=Settings.Alarm.Hours
MouseOverAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^.*:(\d{2})"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable AlarmMinutes "([#AlarmMinutes]=59 ? 0 : [#AlarmMinutes]+1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollDownAction=[!SetVariable AlarmMinutes "([#AlarmMinutes]=0 ? 59 : [#AlarmMinutes]-1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
X=6R

[Settings.Alarm.Toggle.Measure]
Measure=String
String=[#AlarmBool]
IfCondition=Settings.Alarm.Toggle.Measure=1
IfTrueAction=[!EnableMeasure Alarm.Main]
IfFalseAction=[!DisableMeasure Alarm.Main]
Substitute="0":"[\xF19E]", "1":"[\xF19F]"
DynamicVariables=1

[Settings.Alarm.Toggle]
Meter=String
MeterStyle=Icons
FontSize=15
X=31
Y=32
Hidden=1
Group=Settings | AlarmSettings
MeasureName=Settings.Alarm.Toggle.Measure
LeftMouseUpAction=[!SetVariable AlarmBool (1-[#AlarmBool])][!WriteKeyValue Variables AlarmBool "[#AlarmBool]"][!UpdateMeasure Settings.Alarm.Toggle.Measure][!UpdateMeter Settings.Alarm.Toggle][!Redraw]
Timerlarm_v1.0.0.rmskin
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
User avatar
sl23
Posts: 1631
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

:welcome:
Last edited by sl23 on September 6th, 2024, 6:31 pm, edited 3 times in total.
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1631
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

:welcome:
Last edited by sl23 on September 6th, 2024, 6:31 pm, edited 1 time in total.
57686174 77696C6C 6265 77696C6C 6265
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: Simple countdown timer

Post by death.crafter »

sl23 wrote: August 4th, 2021, 9:44 pm Really good what you did with the buttons, but I don't like that you can't see everything.

The idea is to be able to set the timer and alarm together and see the current time, timer remaining time and the alarm time.
P.S.:
I like to hide things as much as possible :rofl:
I would like it like this:
sl23 wrote: August 4th, 2021, 9:44 pm What about the latest version? is that an improvement? Despite the issues! :oops:
Ofc it is improved. Personally I like how it looks. About the errors I may look into it tomorrow when I got time.

What I did was to make the hide show patterns more legible. The looks and stuff are ofc your doing. As you see I don't make much skins. So I am adept at modifying others' works :rolmfao:
from the Realm of Death
User avatar
sl23
Posts: 1631
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

:welcome:
Last edited by sl23 on September 6th, 2024, 6:32 pm, edited 1 time in total.
57686174 77696C6C 6265 77696C6C 6265
User avatar
Yincognito
Rainmeter Sage
Posts: 8071
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple countdown timer

Post by Yincognito »

sl23 wrote: August 4th, 2021, 9:44 pmWhat about the latest version? is that an improvement? Despite the issues! :oops:
I didn't see any serious issue for the brief time I tested it, but it looks much better and consistent, and visually appealing. I'm still a bit confused by what to click to do this or that, but from my part, it's alright. Good job! :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1631
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Simple countdown timer

Post by sl23 »

:welcome:
Last edited by sl23 on September 6th, 2024, 6:32 pm, edited 1 time in total.
57686174 77696C6C 6265 77696C6C 6265