It is currently April 20th, 2024, 7:19 am

String meter won't update

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

String meter won't update

Post by sl23 »

Everything works! I can see it written to the skin's INI file, so I know this is working fine under the hood. It's just that no matter what I do, this meter refuses to update except on a skin refresh, which I really do not want.

I'm afraid this is back to the Timer skin :o

I've gone back to the original skin this was from and found that this fault goes back to that. Why is this meter not being updated, despite using [!UpdateMeter Action][!UpdateMeter *][!Redraw] bangs?

Original Clock/Timer skin:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
MouseActionCursor=0
OnRefreshAction=[!PauseMeasureGroup TimerGroup][!HideMeterGroup Controls][!HideMeter OK][!SetOption #ActionText# FillAlpha "FillColor #Color2#"][!UpdateMeter *][!Redraw]

[Metadata]
Name=RoundClock
Author=sl23
Information=Clock including Timer, alarm and hourly chime.||Credits:||Timer code by Yincognito and death.crafter.||Adapted from "SimplyRound" Suite by Krzysztof "gronostaj" Smialek||AlarmClock code adapted from a skin by Youkai1977||Help via forum: balala, eclectic-tech, jsmorley
Version=2021.9.6
License=CC BY 3.0

[Variables]
; The time at which the timer / stopwatch is set or reset, in seconds (>0 for a timer, 0 for a stopwatch)
DefaultHours=2
DefaultMinutes=10
DefaultSeconds=0
; 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

Click=ms-settings:dateandtime
HourColour=255,100,100
MinuteColour=255,170,0
SecondsColour=128,255,0
TimerColor=100,100,200

Color1=255,255,255,200
Color2=128,255,0
Color3=255,255,0
Color4=0,255,255
Color5=255,255,255,60

ChimeSound=Calligraphy.wav
; ChimeSound disabled whilst these apps are running
Process1=VLC.exe
Process2=foobar2000.exe
Process3=MuLab.exe

; These apps will start the Timer when run and pause it when stopped. So that you can time the use of them. Also, when the Timer reaches zero, these apps will close if the Setting "CloseApps" is used.
APP1=Dolphin.exe
APP2=pcsx2.exe
APP3=rpcs3.exe
APP4=retroarch.exe
APP5=cemu.exe
APP6=Project64.exe

Alarm=Alarm.wav
AlarmHourSet=23
AlarmMinuteSet=0

Hibernate=rundll32.exe powrprof.dll,SetSuspendState
Shutdown=shutdown.exe -s -t 5 -f
Lock=rundll32.exe user32.dll, LockWorkStation
CloseApps=!CommandMeasure mClose Run
Off=
Act=

ActionText=Off
Message1=10 mins until #ActionText#
Message2=#ActionText# Now

========================================
; Background
========================================
[Bg]
Meter=Shape
Shape=Rectangle 0,0,230,70,35 | Fill Color 0,0,0,150 | StrokeWidth 2 | Extend StrokeAlpha
StrokeAlpha=Stroke Color #Color5#
DynamicVariables=1
X=2
Y=2

[BgAlarm]
Meter=Shape
Shape=Rectangle 0,0,60,60,50 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha
Shape2=Rectangle 9,9,42,42,50 | Fill Color 0,0,0,1 | StrokeWidth 2 | Extend StrokeAlpha2
Shape3=Rectangle 5,5,50,50,50 | Fill Color 0,0,0,1 | StrokeWidth 10 | Stroke Color 255,255,255,20
StrokeAlpha=Stroke Color #Color5#
StrokeAlpha2=Stroke Color #Color5#

LeftMouseUpAction=[!EnableMeasure mChimeHour] [!ShowMeter ChimeIcon] [!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color #Color5#"] [!DisableMeasureGroup ALARM] [!HideMeterGroup AlarmSet][!SetOption Action Text "#ActionText#"] [PlayStop "#Alarm#"] [!Update][!UpdateMeter *][!Redraw]

RightMouseUpAction=[!DisableMeasure mChimeHour] [!HideMeter ChimeIcon] [!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color 128,255,0,200"] [!EnableMeasureGroup ALARM] [!ShowMeter HourAlarm] [!ShowMeter MinuteAlarm] [!Update][!UpdateMeter *][!Redraw]

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color4#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color5#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
ToolTipText="L - Alarm Off#CRLF#R - Alarm On"
X=7
Y=7

[BgLine]
Meter=Shape
Shape=Rectangle 67,42,100,1,0 | Fill Color #Color5# | StrokeWidth 0
DynamicVariables=1

[BgTimer]
Meter=Shape
Shape=Rectangle 0,0,60,60,50 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha
Shape2=Rectangle 9,9,42,42,50 | Fill Color 0,0,0,1 | StrokeWidth 2 | Extend StrokeAlpha2
Shape3=Rectangle 5,5,50,50,50 | Fill Color 0,0,0,1 | StrokeWidth 10 | Stroke Color 255,255,255,20
StrokeAlpha=Stroke Color #Color5#
StrokeAlpha2=Stroke Color #Color5#

LeftMouseUpAction=[!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color #Color5#"]  [!HideMeterGroup Controls][!SetOption Action Text "#ActionText#"] [PlayStop "#Alarm#"] [!Update][!UpdateMeter *][!Redraw]

RightMouseUpAction=[!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color 128,255,0,200"] [!ShowMeterGroup Controls] [!Update][!UpdateMeter *][!Redraw]

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color4#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color5#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
ToolTipText="L - Timer Off#CRLF#R - Timer On"
X=167
Y=7

========================================
; STYLES
========================================
[sAllText]
FontFace=Trebuchet MS
StringStyle=Bold
StringAlign=Center
FontSize=16
FontColor=#Color1#
StringEffect=Shadow
FontEffectColor=0,0,0,150
AntiAlias=1
InlineSetting=Size | 8
InlinePattern=#CRLF#.+

[sRoundBar]
LineStart=22
LineLength=29
LineWidth=2
StartAngle=(Rad(270))
Antialias=1
Solid=0

[sHighlight]
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "#Color2#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "#Color1#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]

========================================
; Time
========================================
[mHour]
Measure=Time
Format=%#I
MinValue=0
MaxValue=12

[mMinutes]
Measure=Time
Format=%M
MinValue=0
MaxValue=60

[mSecond]
Measure=Time
Format=%S
MinValue=0
MaxValue=60

[mDate]
Measure=Time
Format=%a  %#d  %b

[HoursBar]
Meter=Roundline
MeasureName=mHour
MeterStyle=sRoundBar
LineColor=#HourColour#
X=37
Y=37

[MinutesBar]
Meter=Roundline
MeasureName=mMinutes
MeterStyle=sRoundBar
LineColor=#MinuteColour#
X=r
Y=r

[SecondsBar]
Meter=Roundline
MeasureName=mSecond
MeterStyle=sRoundBar
LineColor=#SecondsColour#
X=r
Y=r

[Value]
Meter=String
MeasureName=mHour
MeasureName2=mMinutes
MeterStyle=sAllText | sHighlight
Text=%1:%2#CRLF#[mDate]
LeftMouseUpAction=#Click#
X=117
Y=19

========================================
; CHIME
========================================
[mChimeHour]
Measure=Time
Format=%M
IfEqualValue=0
IfEqualAction=[Play #ChimeSound#]

[ChimeIcon]
Meter=String
MeterStyle=sAllText
FontFace=Segoe Fluent Icons
FontSize=14
Text=[\xE8D6]
X=36
Y=27
W=16
H=16

============================================
; Enable/Disable Chime on Process Start/Stop
============================================
[mProcessDisableChime]
Measure=Calc
Formula=1
IfCondition=(mProcess1=1) || (mProcess2=1) || (mProcess3=1)
IfTrueAction=[!DisableMeasure mChimeHour][!SetOption ChimeIcon FontColor ""][!UpdateMeter *][!Redraw]
IfFalseAction=[!EnableMeasure mChimeHour][!SetOption ChimeIcon FontColor "#Color2#,200"][!UpdateMeter *][!Redraw]

[mProcess1]
Measure=Plugin
Plugin=Process
ProcessName=#Process1#

[mProcess2]
Measure=Plugin
Plugin=Process
ProcessName=#Process2#

[mProcess3]
Measure=Plugin
Plugin=Process
ProcessName=#Process3#

========================================
; Alarm
========================================
[mDigitPrefixerAlarm]
Measure=calc
Formula=00
Dynamicvariables=1
IfCondition=(#AlarmHourSet# >= 0) && (#AlarmHourSet# <= 9)
IfTrueAction=[!SetOption HourAlarm Prefix "0"]
IfFalseAction=[!SetOption HourAlarm Prefix ""]
IfCondition2=(#AlarmMinuteSet# >= 0) && (#AlarmMinuteSet# <= 9)
IfTrueAction2=[!SetOption MinuteAlarm Prefix "0"]
IfFalseAction2=[!SetOption MinuteAlarm Prefix ""]
Group=mALARM | ALARM

[mHourAlarm]
Measure=Time
Format=%H
Group=ALARM

[mMinuteAlarm]
Measure=Time
Format=%M
Group=ALARM

[Alarm]
Measure=calc
Formula=0
DynamicVariables=1
IfCondition=(mHourAlarm = #AlarmHourSet#) && (mMinuteAlarm = #AlarmMinuteSet#-10)
IfTrueAction=[!SetOption Action Text "#Message1#"][Play #Alarm#][!Redraw]
IfCondition2=(mHourAlarm = #AlarmHourSet#) && (mMinuteAlarm = #AlarmMinuteSet#)
IfTrueAction2=[!SetOption Action Text "#Message2#"][#Act#][!Redraw]

[HourAlarm]
Meter=String
MeasureName=mHour
MeterStyle=sAllText | sHighlight
FontSize=9
Text=#AlarmHourSet#:
DynamicVariables=1
MouseScrollUpAction=[!SetVariable AlarmHourSet (Clamp(#AlarmHourSet#+1,0,23))] [!UpdateMeasureGroup mALARM] [!UpdateMeter HourAlarm] [!Redraw]
MouseScrollDownAction=[!SetVariable AlarmHourSet (Clamp(#AlarmHourSet#-1,0,23))] [!UpdateMeasureGroup mALARM] [!UpdateMeter HourAlarm] [!Redraw]
Group=AlarmSet
Hidden=1
X=29
Y=30

[MinuteAlarm]
Meter=String
MeterStyle=sAllText | sHighlight
FontSize=9
Text=#AlarmMinuteSet#
DynamicVariables=1
MouseScrollUpAction=[!SetVariable AlarmMinuteSet (Clamp(#AlarmMinuteSet#+1,0,59))] [!UpdateMeasureGroup mALARM] [!UpdateMeter MinuteAlarm] [!Redraw]
MouseScrollDownAction=[!SetVariable AlarmMinuteSet (Clamp(#AlarmMinuteSet#-1,0,59))] [!UpdateMeasureGroup mALARM] [!UpdateMeter MinuteAlarm] [!Redraw]
Group=AlarmSet
Hidden=1
X=-4R
Y=r

========================================
; Countdown
========================================
[mTime]
Group=TimerGroup
Measure=Time
Format=%H:%M %S
OnChangeAction=[!SetVariable Seconds (#Seconds#+#Direction#*(1-#Reset#))]
DynamicVariables=1

[mUptime]
Group=TimerGroup
Measure=Uptime
SecondsValue=#Seconds#
Format="%3!02i!:%2!02i!#CRLF#%1!02i!"
MaxValue=([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)
IfCondition=(#CURRENTSECTION#<=0) && (Sgn(#Direction#)=-1)
IfTrueAction=[!PauseMeasureGroup TimerGroup][#Act#][!SetOption Action Text "#Message2#"][Play "#Alarm#"][!Redraw]
IfCondition2=(#CURRENTSECTION#=600)
IfTrueAction2=[!SetOption Action Text "#Message1#"][Play "#Alarm#"][!Redraw]
IfConditionMode=1
DynamicVariables=1
OnUpdateAction=[!Log "Seconds = #Seconds#, mUptime = [mUptime]"]

[mClose]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=taskkill /IM #APP1#;taskkill /IM #APP2#;taskkill /IM #APP3#;taskkill /IM #APP4#;taskkill /IM #APP5#;taskkill /IM #APP6#

[UptimeText]
Meter=String
MeasureName=mUptime
MeterStyle=sAllText
FontSize=10
Text=%1
InlineSetting=Size | 8
InlinePattern=^.*(\s.*)$
InlineSetting2=Weight | 800
InlinePattern2=^.*(\s.*)$
InlinePattern3=^$
InlineSetting3=Color | #Color2#
Group=Start | Controls
Hidden=1
X=197
Y=27

[Hours]
Meter=Image
SolidColor=0,0,0,1
MouseOverAction=[!SetOption UptimeText InlinePattern3 "^(\d{2})"][!UpdateMeter UptimeText][!Redraw]
MouseLeaveAction=[!SetOption UptimeText InlinePattern3 "^$"][!UpdateMeter UptimeText][!Redraw]
MouseScrollUpAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultHours]=99 ? 0 : [#DefaultHours]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultHours]=0 ? 99 : [#DefaultHours]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
DynamicVariables=1
Hidden=1
Group=Settings
H=15
W=20
X=-20r
Y=r

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

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

[TimerBar]
Meter=RoundLine
MeasureName=mUptime
MeterStyle=sRoundBar
LineColor=#Color2#
LineWidth=5
Group=Controls | Timer
Hidden=1
X=197
Y=37

========================================
; Process
========================================
[mProcessTimerStart]
Measure=Calc
Formula=1
IfCondition=(mAPP1=1) || (mAPP2=1) || (mAPP3=1) || (mAPP4=1) || (mAPP5=1) || (mAPP6=1)
IfTrueAction=[!ActivateConfig "RM\ScreenSaver" "ScreenSaver..ini"][!UnpauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!ShowMeterGroup Controls][!SetOptionGroup Start FontColor "#Color3#"][!Redraw]
IfFalseAction=[!DeactivateConfig "RM\ScreenSaver" "ScreenSaver v2..ini"][!PauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color1#"][PlayStop "#Alarm#"][!Redraw]

[mAPP1]
Measure=Plugin
Plugin=Process
ProcessName=#APP1#

[mAPP2]
Measure=Plugin
Plugin=Process
ProcessName=#APP2#

[mAPP3]
Measure=Plugin
Plugin=Process
ProcessName=#APP3#

[mAPP4]
Measure=Plugin
Plugin=Process
ProcessName=#APP4#

[mAPP5]
Measure=Plugin
Plugin=Process
ProcessName=#APP5#

[mAPP6]
Measure=Plugin
Plugin=Process
ProcessName=#APP6#

========================================
; Controls
========================================
[sControls]
FontFace=Segoe Fluent Icons
FontSize=10
StringAlign=CenterCenter
X=92
Y=63

[Play]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE768]
;Text=[\xE81C]
LeftMouseUpAction=[!UnpauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color3#"][!Redraw]
Group=PlayPause | Start | Controls

[Pause]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE769]
LeftMouseUpAction=[!PauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color1#"][PlayStop "#Alarm#"][!Redraw]
Group=PlayPause | Start

[Reset]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE72C]
FontSize=9
LeftMouseUpAction=[!Refresh]
ToolTipText=Reset/Alarm Stop
Group=Controls
X=25r

[Set]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE713]
FontSize=9
LeftMouseUpAction=[!ToggleMeterGroup Settings][!HideMeter Action][!SetOptionGroup Button Hidden "0"] [!UpdateMeter *][!Redraw]
Group=Controls | Settings
X=25r

[OK]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE930]
FontSize=9
LeftMouseUpAction=[!ToggleMeterGroup Settings][!ShowMeter Action][!SetOptionGroup Button Hidden "1"] [!UpdateMeter *][!WriteKeyValue Variables DefaultSeconds [#DefaultSeconds]][!WriteKeyValue Variables DefaultMinutes [#DefaultMinutes]][!WriteKeyValue Variables DefaultHours [#DefaultHours]][!Redraw]
Group=Settings
Hidden=1
X=r

========================================
; Buttons
========================================
[sButton]
Shape=Rectangle 0,0,10,10,50 | Extend FillAlpha | StrokeWidth 2 | Extend StrokeAlpha
FillAlpha=FillColor #Color5#
StrokeAlpha=StrokeColor 128,255,0,0
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor 255,255,0,255"] [!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""] [!UpdateMeter *] [!Redraw] 
LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue Variables Act [##CURRENTSECTION#]] [!WriteKeyValue Variables ActionText [#CURRENTSECTION]] [!UpdateMeter *][!Redraw]
ToolTipText=[#CURRENTSECTION]
DynamicVariables=1
Group=Button
Hidden=1
MouseActionCursor=0
UpdateDivider=-1
X=20r
Y=r

[CloseApps]
Meter=Shape
MeterStyle=sButton
X=72
Y=8

[Hibernate]
Meter=Shape
MeterStyle=sButton

[Shutdown]
Meter=Shape
MeterStyle=sButton

[Lock]
Meter=Shape
MeterStyle=sButton

[Off]
Meter=Shape
MeterStyle=sButton

========================================
; Message
========================================
[Action]
Meter=String
MeterStyle=sAllText
FontSize=9
FontColor=255,228,110,255
Text=#ActionText#
Group=Controls
Hidden=1
X=117
Y=6
Thanks for your help
Last edited by sl23 on October 19th, 2021, 9:36 pm, edited 1 time in total.
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: String meter won't update

Post by balala »

sl23 wrote: October 13th, 2021, 5:12 pm Everything works! I can see it written to the skin's INI file, so I know this is working fine under the hood. It's just that no matter what I do, this meter refuses to update except on a skin refresh, which I really do not want.
The !WriteKeyValue bang writes the variable or another option permanently to the code, but this to take effect you need a refresh of the skin. If you want to avoid this, it is possibile, but you have to use two bangs: a !WriteKeyValue to write the variable / option and a !SetOption or !SetVariable, to dynamically change the same option or variable. Using the two bangs altogether, let you to have both, a permanent writing to keep the change even after a refresh and a dynamical update of the code for direct change. This way you can avoid the refresh but if one occurs (accidentally or intentionally), the change is kept.
So I suppose you should have to add the [!SetVariable Act "[##CURRENTSECTION#]"] bang to the LeftMouseUpAction option of the [sButton] section:

Code: Select all

[sButton]
...
LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue Variables Act [##CURRENTSECTION#]][!SetVariable Act "[##CURRENTSECTION#]"][!WriteKeyValue Variables ActionText [#CURRENTSECTION]] [!UpdateMeter *][!Redraw]
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: String meter won't update

Post by sl23 »

Oh of course! Thanks balala, I've been trying all-sorts to try and understand why this isn't working! :thumbup:
- MuLab -
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: String meter won't update

Post by sl23 »

I just noticed, in my haste to post the original message, I actually forgot to specify which meter I was having an issue with! Sorry about that. Well done for finding it :thumbup:

Unfortunately the suggestion you gave isn't working for me. Would you know why that is.

After adding your Snippet, this is the code for the Buttons now:

Code: Select all

[sButton]
Shape=Rectangle 0,0,10,10,50 | Extend FillAlpha | StrokeWidth 2 | Extend StrokeAlpha
FillAlpha=FillColor #Color5#
StrokeAlpha=StrokeColor 128,255,0,0
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor 255,255,0,255"] [!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""] [!UpdateMeter *] [!Redraw] 
LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue Variables Act [##CURRENTSECTION#]] [!WriteKeyValue Variables ActionText [#CURRENTSECTION]] [!SetVariable ActionText "[##CURRENTSECTION#]"][!UpdateMeter *][!Redraw]
ToolTipText=[#CURRENTSECTION]
DynamicVariables=1
Group=Button
Hidden=1
MouseActionCursor=0
UpdateDivider=-1
X=20r
Y=r
Btw, it's the Text=#ActionText# Variable I'm trying to change, on the [Action] meter.
- MuLab -
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: String meter won't update

Post by sl23 »

I've tried moving this Snippet about and removing leading and trailing '#' just in case, seeing as the !WriteKeyVariable only has one #. Nothing seems to work with it though. Any further ideas on why it doesn't work?
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: String meter won't update

Post by balala »

sl23 wrote: October 14th, 2021, 4:39 pm Nothing seems to work with it though. Any further ideas on why it doesn't work?
There are two mistakes in the code:
  • First there is missing a !SetVariable bang from the LeftMouseUpAction option of the last posted [sButton] section (I'm talking about the [!SetVariable Act "[##CURRENTSECTION#]"] bang). Add it:

    Code: Select all

    [sButton]
    ...
    LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue Variables Act [##CURRENTSECTION#]] [!WriteKeyValue Variables ActionText [#CURRENTSECTION]][!SetVariable Act "[##CURRENTSECTION#]"][!SetVariable ActionText "[##CURRENTSECTION#]"][!UpdateMeter *][!Redraw]
  • Secondly you have to add the missing DyanmicVariables=1 option to the [Action] meter, because if you want this meter to use a dynamically set variable (ActionText in this case), this option is required.
Have these fixed the issues?
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: String meter won't update

Post by sl23 »

Thank you for your reply balala.

I thought you'd maybe misunderstood my intent, but then I realised the need for setting the Act variable. I changed it to the ActionText in the Bang as that's the issue I was having. But you are right, the Act variable also needs updating if selected via the buttons.

Ok, so I added both bangs and the DynamicVariables to the meter, but it still is not working as intended.

Code: Select all

LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue Variables Act [##CURRENTSECTION#]] [!WriteKeyValue Variables ActionText [#CURRENTSECTION]] [!SetVariable Act "[##CURRENTSECTION#]"][!SetVariable ActionText "[##CURRENTSECTION#]"][!UpdateMeter *][!Redraw]
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: String meter won't update

Post by balala »

sl23 wrote: October 14th, 2021, 9:50 pm Ok, so I added both bangs and the DynamicVariables to the meter, but it still is not working as intended.
I'm surprised, because it does for me. Post please the whole code.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: String meter won't update

Post by sl23 »

Here ya go... :thumbup:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
MouseActionCursor=0
OnRefreshAction=[!PauseMeasureGroup TimerGroup][!HideMeterGroup Controls][!HideMeter OK][!SetOption #ActionText# FillAlpha "FillColor #Color2#"][!UpdateMeter *][!Redraw]

[Metadata]
Name=RoundClock
Author=sl23
Information=Clock including Timer, alarm and hourly chime.||Credits:||Timer code by Yincognito and death.crafter.||Adapted from "SimplyRound" Suite by Krzysztof "gronostaj" Smialek||AlarmClock code adapted from a skin by Youkai1977||Help via forum: balala, eclectic-tech, jsmorley
Version=2021.9.6
License=CC BY 3.0

[Variables]
; The time at which the timer / stopwatch is set or reset, in seconds (>0 for a timer, 0 for a stopwatch)
DefaultHours=2
DefaultMinutes=10
DefaultSeconds=0
; 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

Click=ms-settings:dateandtime
HourColour=255,100,100
MinuteColour=255,170,0
SecondsColour=128,255,0
TimerColor=100,100,200

Color1=255,255,255,200
Color2=128,255,0
Color3=255,255,0
Color4=0,255,255
Color5=255,255,255,60

ChimeSound=Calligraphy.wav
; ChimeSound disabled whilst these apps are running
Process1=VLC.exe
Process2=foobar2000.exe
Process3=MuLab.exe

; These apps will start the Timer when run and pause it when stopped. So that you can time the use of them. Also, when the Timer reaches zero, these apps will close if the Setting "CloseApps" is used.
APP1=Dolphin.exe
APP2=pcsx2.exe
APP3=rpcs3.exe
APP4=retroarch.exe
APP5=cemu.exe
APP6=Project64.exe

Alarm=Alarm.wav
AlarmHourSet=23
AlarmMinuteSet=0

Hibernate=rundll32.exe powrprof.dll,SetSuspendState
Shutdown=shutdown.exe -s -t 5 -f
Lock=rundll32.exe user32.dll, LockWorkStation
CloseApps=!CommandMeasure mClose Run
Off=
Act=

ActionText=Off
Message1=10 mins until #ActionText#
Message2=#ActionText# Now

========================================
; Background
========================================
[Bg]
Meter=Shape
Shape=Rectangle 0,0,230,70,35 | Fill Color 0,0,0,150 | StrokeWidth 2 | Extend StrokeAlpha
StrokeAlpha=Stroke Color #Color5#
DynamicVariables=1
X=2
Y=2

[BgAlarm]
Meter=Shape
Shape=Rectangle 0,0,60,60,50 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha
Shape2=Rectangle 9,9,42,42,50 | Fill Color 0,0,0,1 | StrokeWidth 2 | Extend StrokeAlpha2
Shape3=Rectangle 5,5,50,50,50 | Fill Color 0,0,0,1 | StrokeWidth 10 | Stroke Color 255,255,255,20
StrokeAlpha=Stroke Color #Color5#
StrokeAlpha2=Stroke Color #Color5#

LeftMouseUpAction=[!EnableMeasure mChimeHour] [!ShowMeter ChimeIcon] [!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color #Color5#"] [!DisableMeasureGroup ALARM] [!HideMeterGroup AlarmSet][!SetOption Action Text "#ActionText#"] [PlayStop "#Alarm#"] [!Update][!UpdateMeter *][!Redraw]

RightMouseUpAction=[!DisableMeasure mChimeHour] [!HideMeter ChimeIcon] [!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color 128,255,0,200"] [!EnableMeasureGroup ALARM] [!ShowMeter HourAlarm] [!ShowMeter MinuteAlarm] [!Update][!UpdateMeter *][!Redraw]

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color4#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color5#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
ToolTipText="L - Alarm Off#CRLF#R - Alarm On"
X=7
Y=7

[BgLine]
Meter=Shape
Shape=Rectangle 67,42,100,1,0 | Fill Color #Color5# | StrokeWidth 0
DynamicVariables=1

[BgTimer]
Meter=Shape
Shape=Rectangle 0,0,60,60,50 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha
Shape2=Rectangle 9,9,42,42,50 | Fill Color 0,0,0,1 | StrokeWidth 2 | Extend StrokeAlpha2
Shape3=Rectangle 5,5,50,50,50 | Fill Color 0,0,0,1 | StrokeWidth 10 | Stroke Color 255,255,255,20
StrokeAlpha=Stroke Color #Color5#
StrokeAlpha2=Stroke Color #Color5#

LeftMouseUpAction=[!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color #Color5#"]  [!HideMeterGroup Controls][!SetOption Action Text "#ActionText#"] [PlayStop "#Alarm#"] [!Update][!UpdateMeter *][!Redraw]

RightMouseUpAction=[!SetOption #CURRENTSECTION# StrokeAlpha2 "Stroke Color 128,255,0,200"] [!ShowMeterGroup Controls] [!Update][!UpdateMeter *][!Redraw]

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color4#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Color5#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
ToolTipText="L - Timer Off#CRLF#R - Timer On"
X=167
Y=7

========================================
; STYLES
========================================
[sAllText]
FontFace=Trebuchet MS
StringStyle=Bold
StringAlign=Center
FontSize=16
FontColor=#Color1#
StringEffect=Shadow
FontEffectColor=0,0,0,150
AntiAlias=1
InlineSetting=Size | 8
InlinePattern=#CRLF#.+

[sRoundBar]
LineStart=22
LineLength=29
LineWidth=2
StartAngle=(Rad(270))
Antialias=1
Solid=0

[sHighlight]
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "#Color2#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "#Color1#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]

========================================
; Time
========================================
[mHour]
Measure=Time
Format=%#I
MinValue=0
MaxValue=12

[mMinutes]
Measure=Time
Format=%M
MinValue=0
MaxValue=60

[mSecond]
Measure=Time
Format=%S
MinValue=0
MaxValue=60

[mDate]
Measure=Time
Format=%a  %#d  %b

[HoursBar]
Meter=Roundline
MeasureName=mHour
MeterStyle=sRoundBar
LineColor=#HourColour#
X=37
Y=37

[MinutesBar]
Meter=Roundline
MeasureName=mMinutes
MeterStyle=sRoundBar
LineColor=#MinuteColour#
X=r
Y=r

[SecondsBar]
Meter=Roundline
MeasureName=mSecond
MeterStyle=sRoundBar
LineColor=#SecondsColour#
X=r
Y=r

[Value]
Meter=String
MeasureName=mHour
MeasureName2=mMinutes
MeterStyle=sAllText | sHighlight
Text=%1:%2#CRLF#[mDate]
LeftMouseUpAction=#Click#
X=117
Y=19

========================================
; CHIME
========================================
[mChimeHour]
Measure=Time
Format=%M
IfEqualValue=0
IfEqualAction=[Play #ChimeSound#]

[ChimeIcon]
Meter=String
MeterStyle=sAllText
FontFace=Segoe Fluent Icons
FontSize=14
Text=[\xE8D6]
X=36
Y=27
W=16
H=16

============================================
; Enable/Disable Chime on Process Start/Stop
============================================
[mProcessDisableChime]
Measure=Calc
Formula=1
IfCondition=(mProcess1=1) || (mProcess2=1) || (mProcess3=1)
IfTrueAction=[!DisableMeasure mChimeHour][!SetOption ChimeIcon FontColor ""][!UpdateMeter *][!Redraw]
IfFalseAction=[!EnableMeasure mChimeHour][!SetOption ChimeIcon FontColor "#Color2#,200"][!UpdateMeter *][!Redraw]

[mProcess1]
Measure=Plugin
Plugin=Process
ProcessName=#Process1#

[mProcess2]
Measure=Plugin
Plugin=Process
ProcessName=#Process2#

[mProcess3]
Measure=Plugin
Plugin=Process
ProcessName=#Process3#

========================================
; Alarm
========================================
[mDigitPrefixerAlarm]
Measure=calc
Formula=00
Dynamicvariables=1
IfCondition=(#AlarmHourSet# >= 0) && (#AlarmHourSet# <= 9)
IfTrueAction=[!SetOption HourAlarm Prefix "0"]
IfFalseAction=[!SetOption HourAlarm Prefix ""]
IfCondition2=(#AlarmMinuteSet# >= 0) && (#AlarmMinuteSet# <= 9)
IfTrueAction2=[!SetOption MinuteAlarm Prefix "0"]
IfFalseAction2=[!SetOption MinuteAlarm Prefix ""]
Group=mALARM | ALARM

[mHourAlarm]
Measure=Time
Format=%H
Group=ALARM

[mMinuteAlarm]
Measure=Time
Format=%M
Group=ALARM

[Alarm]
Measure=calc
Formula=0
DynamicVariables=1
IfCondition=(mHourAlarm = #AlarmHourSet#) && (mMinuteAlarm = #AlarmMinuteSet#-10)
IfTrueAction=[!SetOption Action Text "#Message1#"][Play #Alarm#][!Redraw]
IfCondition2=(mHourAlarm = #AlarmHourSet#) && (mMinuteAlarm = #AlarmMinuteSet#)
IfTrueAction2=[!SetOption Action Text "#Message2#"][#Act#][!Redraw]

[HourAlarm]
Meter=String
MeasureName=mHour
MeterStyle=sAllText | sHighlight
FontSize=9
Text=#AlarmHourSet#:
DynamicVariables=1
MouseScrollUpAction=[!SetVariable AlarmHourSet (Clamp(#AlarmHourSet#+1,0,23))] [!UpdateMeasureGroup mALARM] [!UpdateMeter HourAlarm] [!Redraw]
MouseScrollDownAction=[!SetVariable AlarmHourSet (Clamp(#AlarmHourSet#-1,0,23))] [!UpdateMeasureGroup mALARM] [!UpdateMeter HourAlarm] [!Redraw]
Group=AlarmSet
Hidden=1
X=29
Y=30

[MinuteAlarm]
Meter=String
MeterStyle=sAllText | sHighlight
FontSize=9
Text=#AlarmMinuteSet#
DynamicVariables=1
MouseScrollUpAction=[!SetVariable AlarmMinuteSet (Clamp(#AlarmMinuteSet#+1,0,59))] [!UpdateMeasureGroup mALARM] [!UpdateMeter MinuteAlarm] [!Redraw]
MouseScrollDownAction=[!SetVariable AlarmMinuteSet (Clamp(#AlarmMinuteSet#-1,0,59))] [!UpdateMeasureGroup mALARM] [!UpdateMeter MinuteAlarm] [!Redraw]
Group=AlarmSet
Hidden=1
X=-4R
Y=r

========================================
; Countdown
========================================
[mTime]
Group=TimerGroup
Measure=Time
Format=%H:%M %S
OnChangeAction=[!SetVariable Seconds (#Seconds#+#Direction#*(1-#Reset#))]
DynamicVariables=1

[mUptime]
Group=TimerGroup
Measure=Uptime
SecondsValue=#Seconds#
Format="%3!02i!:%2!02i!#CRLF#%1!02i!"
MaxValue=([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)
IfCondition=(#CURRENTSECTION#<=0) && (Sgn(#Direction#)=-1)
IfTrueAction=[!PauseMeasureGroup TimerGroup][#Act#][!SetOption Action Text "#Message2#"][Play "#Alarm#"][!Redraw]
IfCondition2=(#CURRENTSECTION#=600)
IfTrueAction2=[!SetOption Action Text "#Message1#"][Play "#Alarm#"][!Redraw]
IfConditionMode=1
DynamicVariables=1
OnUpdateAction=[!Log "Seconds = #Seconds#, mUptime = [mUptime]"]

[mClose]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=taskkill /IM #APP1#;taskkill /IM #APP2#;taskkill /IM #APP3#;taskkill /IM #APP4#;taskkill /IM #APP5#;taskkill /IM #APP6#

[UptimeText]
Meter=String
MeasureName=mUptime
MeterStyle=sAllText
FontSize=10
Text=%1
InlineSetting=Size | 8
InlinePattern=^.*(\s.*)$
InlineSetting2=Weight | 800
InlinePattern2=^.*(\s.*)$
InlinePattern3=^$
InlineSetting3=Color | #Color2#
Group=Start | Controls
Hidden=1
X=197
Y=27

[Hours]
Meter=Image
SolidColor=0,0,0,1
MouseOverAction=[!SetOption UptimeText InlinePattern3 "^(\d{2})"][!UpdateMeter UptimeText][!Redraw]
MouseLeaveAction=[!SetOption UptimeText InlinePattern3 "^$"][!UpdateMeter UptimeText][!Redraw]
MouseScrollUpAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultHours]=99 ? 0 : [#DefaultHours]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultHours]=0 ? 99 : [#DefaultHours]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
DynamicVariables=1
Hidden=1
Group=Settings
H=15
W=20
X=-20r
Y=r

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

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

[TimerBar]
Meter=RoundLine
MeasureName=mUptime
MeterStyle=sRoundBar
LineColor=#Color2#
LineWidth=5
Group=Controls | Timer
Hidden=1
X=197
Y=37

========================================
; Process
========================================
[mProcessTimerStart]
Measure=Calc
Formula=1
IfCondition=(mAPP1=1) || (mAPP2=1) || (mAPP3=1) || (mAPP4=1) || (mAPP5=1) || (mAPP6=1)
IfTrueAction=[!ActivateConfig "RM\ScreenSaver" "ScreenSaver..ini"][!UnpauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!ShowMeterGroup Controls][!SetOptionGroup Start FontColor "#Color3#"][!Redraw]
IfFalseAction=[!DeactivateConfig "RM\ScreenSaver" "ScreenSaver v2..ini"][!PauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color1#"][PlayStop "#Alarm#"][!Redraw]

[mAPP1]
Measure=Plugin
Plugin=Process
ProcessName=#APP1#

[mAPP2]
Measure=Plugin
Plugin=Process
ProcessName=#APP2#

[mAPP3]
Measure=Plugin
Plugin=Process
ProcessName=#APP3#

[mAPP4]
Measure=Plugin
Plugin=Process
ProcessName=#APP4#

[mAPP5]
Measure=Plugin
Plugin=Process
ProcessName=#APP5#

[mAPP6]
Measure=Plugin
Plugin=Process
ProcessName=#APP6#

========================================
; Controls
========================================
[sControls]
FontFace=Segoe Fluent Icons
FontSize=10
StringAlign=CenterCenter
X=92
Y=63

[Play]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE768]
;Text=[\xE81C]
LeftMouseUpAction=[!UnpauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color3#"][!Redraw]
Group=PlayPause | Start | Controls

[Pause]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE769]
LeftMouseUpAction=[!PauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color1#"][PlayStop "#Alarm#"][!Redraw]
Group=PlayPause | Start

[Reset]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE72C]
FontSize=9
LeftMouseUpAction=[!Refresh]
ToolTipText=Reset/Alarm Stop
Group=Controls
X=25r

[Set]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE713]
FontSize=9
LeftMouseUpAction=[!ToggleMeterGroup Settings][!HideMeter Action][!SetOptionGroup Button Hidden "0"] [!UpdateMeter *][!Redraw]
Group=Controls | Settings
X=25r

[OK]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE930]
FontSize=9
LeftMouseUpAction=[!ToggleMeterGroup Settings][!ShowMeter Action][!SetOptionGroup Button Hidden "1"] [!UpdateMeter *][!WriteKeyValue Variables DefaultSeconds [#DefaultSeconds]][!WriteKeyValue Variables DefaultMinutes [#DefaultMinutes]][!WriteKeyValue Variables DefaultHours [#DefaultHours]][!Redraw]
Group=Settings
Hidden=1
X=r

========================================
; Buttons
========================================
[sButton]
Shape=Rectangle 0,0,10,10,50 | Extend FillAlpha | StrokeWidth 2 | Extend StrokeAlpha
FillAlpha=FillColor #Color5#
StrokeAlpha=StrokeColor 128,255,0,0
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor 255,255,0,255"] [!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""] [!UpdateMeter *] [!Redraw] 
LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #Color5#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue Variables Act [##CURRENTSECTION#]] [!WriteKeyValue Variables ActionText [#CURRENTSECTION]] [!SetVariable Act "[##CURRENTSECTION#]"][!SetVariable ActionText "[##CURRENTSECTION#]"][!UpdateMeter *][!Redraw]
ToolTipText=[#CURRENTSECTION]
DynamicVariables=1
Group=Button
Hidden=1
MouseActionCursor=0
UpdateDivider=-1
X=20r
Y=r

[CloseApps]
Meter=Shape
MeterStyle=sButton
X=72
Y=8

[Hibernate]
Meter=Shape
MeterStyle=sButton

[Shutdown]
Meter=Shape
MeterStyle=sButton

[Lock]
Meter=Shape
MeterStyle=sButton

[Off]
Meter=Shape
MeterStyle=sButton

========================================
; Message
========================================
[Action]
Meter=String
MeterStyle=sAllText
FontSize=9
FontColor=255,228,110,255
Text=#ActionText#
ToolTipText=#Message1#
Group=Controls
Hidden=1
DynamicVariables=1
X=117
Y=6
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: String meter won't update

Post by balala »

sl23 wrote: October 16th, 2021, 11:35 am Here ya go... :thumbup:
Previously while I worked with your code somehow I finished by commenting out the Hibernate, Shutdown, Lock, CloseApps, Off and Act variables, forgot it and this is why I didn't encounter the error. Now that I have them again not-commented out, I suppose what should you do is to rename these variables. For instance:

Code: Select all

[Variables]
...
HibernateV=rundll32.exe powrprof.dll,SetSuspendState
ShutdownV=shutdown.exe -s -t 5 -f
LockV=rundll32.exe user32.dll, LockWorkStation
CloseAppsV=!CommandMeasure mClose Run
OffV=
ActV=
(see that each variable above got a V - obviously you can rename them in a way you prefer).
Sorry for my mistake. Hope this fixes the problem. Please let me know if it does.