Re: Problem with IfMatch
Posted: September 20th, 2022, 8:41 pm
Sorry for interrupting.
I guess the action is requested to be executed when the value in the OFF variable is equal.
(Sorry if I misunderstood)
I made some changes to your code
The format in the OFF variable should be "##:##:##"
I added [] and "" to your Shutdown,Restart,etc variables to make it work.
I guess the action is requested to be executed when the value in the OFF variable is equal.
(Sorry if I misunderstood)
I made some changes to your code
The format in the OFF variable should be "##:##:##"
I added [] and "" to your Shutdown,Restart,etc variables to make it work.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
MouseActionCursor=0
BackgroundMode=2
SolidColor=255,255,255
MouseOverAction=[!ToggleMeterGroup Power] [!UpdateMeter *] [!Redraw]
MouseLeaveAction=[!ToggleMeterGroup Power] [!UpdateMeter *] [!Redraw]
RightMouseUpAction=[!TraMenu]
SkinWidth=150
SkinHeight=55
[Metadata]
Name=Clock + Shutdown
Author=sl23
Information=Clock with Shutdown.||
Version=2022.9.20
License=CC BY 3.0
[Variables]
Black=0,0,0
Trans=0,0,0,1
Shutdown.=250,150,150
Restart.=100,200,100
Sleep.=150,150,250
Lock.=235,170,100
Shutdown=["shutdown.exe" -s -t 00 -f]
;[!Log "Shutdown"]
Restart=["shutdown.exe" -r -t 0]
;[!Log "Restart"]
Sleep=["rundll32.exe" powrprof.dll,SetSuspendState]
;[!Log "Sleep"]
Lock=["rundll32.exe" user32.dll, LockWorkStation]
;[!Log "Lock"]
Startup=["shell:Startup"]
OFF="4:25:00"
========================================
; Time
========================================
[mTime]
Measure=Time
Format=%#I:%M:%S
IfMatch=#OFF#
IfMatchAction=#Sleep#
DynamicVariables=1
[Time]
Meter=String
MeasureName=mTime
FontFace=Trebuchet MS
StringStyle=Bold
StringAlign=CenterCenter
FontSize=25
FontColor=#Black#
;SolidColor=120,120,120
AntiAlias=1
Text=%1
LeftMouseUpAction=[!RefreshApp]
LeftMouseDoubleClickAction=#Startup#
MiddleMouseUpAction=[!Quit]
;ToolTipText="L - Refresh#CRLF#M - Exit"
X=75
Y=20
H=28
========================================
; SHUTDOWN
========================================
[sShut]
Shape=Rectangle 0,0,10,10,5 | Extend FillColor | StrokeWidth 2 | Extend StrokeAlpha
FillColor=Fill Color [#[#CURRENTSECTION]]
StrokeAlpha=Stroke Color #Trans#
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Black#"] [!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""] [!UpdateMeter *] [!Redraw]
DynamicVariables=1
ToolTipText=#CURRENTSECTION#
Group=Power
Hidden=1
X=15r
Y=r
[Shutdown.]
Meter=Shape
MeterStyle=sShut
LeftMouseUpAction=#Shutdown#
X=-26r
Y=18r
[Restart.]
Meter=Shape
MeterStyle=sShut
LeftMouseUpAction=#Restart#
[Sleep.]
Meter=Shape
MeterStyle=sShut
LeftMouseUpAction=#Sleep#
[Lock.]
Meter=Shape
MeterStyle=sShut
LeftMouseUpAction=#Lock#