It is currently September 18th, 2019, 12:09 am

'OnChangeAction' does not work. Please help me.

Help with creating, editing & fixing problems with skins
gkmaz9
Posts: 20
Joined: August 26th, 2019, 10:42 am

'OnChangeAction' does not work. Please help me.

gkmaz9 » August 26th, 2019, 11:21 am

I apologize for not being good at English.

-----------------------------------------------------------

1. I used '!WriteKeyValue' to change the number in the red box.

2. Whenever the number of red boxes changes, I want to record them.(Log)

3. I'm trying to create a log by adding 'OnChangeAction=#@$!@#'
to 'Measure' that Changes a number in red box.

4. The log does not work even if it is pasted in the position of ""AAA"", ""BBB"", ""CCC"" in the code.

5. The code will work when placed in the ""DDD"" position. (measure=time)

-----------------------------------------------------------

Please let me know where is wrong.
I'd like to make a log that is recorded with 'time' when i change something to '!WriteKeyValue'
help me.

as expected...
It seems that this is because "OnChangeAction=" ignore '!refresh'.
If this expectation is correct, I wonder if there is an appropriate alternative.

I tried to change OnChangeAction to OnRefreshAction, but I failed.

-----------------------------------------------------------

I used the 'Code by Active Colors' for testing.

Code: Select all

[rainmeter]
Update=3000


[Variables]
@include=#@#log.inc

Grade=22
LogMax=1000
;DO NOT CHANGE THESE
LogNum=1

-5=
-4=
-3=
-2=
-1=
0=


------------------------------------------[Main Process]-----------------------------------------------

[GrWrite1]
Measure=Plugin
Plugin=InputText
FontFace=Open Sans Bold
W=40
H=20
X=55
Y=75
StringAlign=CenterCenter
FontSize=10
SolidColor=200,200,200,255
FontColor=0,0,0
AntiAlias=1
ClipString=1
DynamicVariables=1
InlineSetting=CharacterSpacing | 2 | 2
DefaultValue=#Grade#
Command1=[!WriteKeyValue Variables Grade $UserInput$][!Refresh]
"""AAA"""

[GrText1]
Meter=String
W=50
H=50
X=25
Y=75
StringAlign=CenterCenter
FontSize=8
FontFace=Open Sans Bold
FontColor=255,255,255
InlineSetting=
AntiAlias=1
ClipString=2
DynamicVariables=1
Text=#Grade#
SolidColor=200,0,0,100
LeftMouseUpAction=[!CommandMeasure "GrWrite1" "ExecuteBatch 1"][!Redraw]
"""BBB"""

[xxxxx]
Measure=Calc
Formula=(#Grade#+1)
DynamicVariables=1
"""CCC"""
OnChangeAction=[!WriteKeyValue Variables LogNum [CLC_NumPlus]][!SetVariable LogNum [CLC_NumPlus]][!WriteKeyValue Variables [CLC_Num6] "[MSR_Date] [xxxxx] " "#@#log.inc"][!Refresh][!WriteKeyValue 6T Text "#*[CLC_Num1]*#"][!WriteKeyValue 5T Text "#*[CLC_Num2]*#"][!WriteKeyValue 4T Text "#*[CLC_Num3]*#"][!WriteKeyValue 3T Text "#*[CLC_Num4]*#"][!WriteKeyValue 2T Text "#*[CLC_Num5]*#"][!WriteKeyValue 1T Text "#*[CLC_Num6]*#"][!Refresh]


[xxxxx2]
Measure=time
DynamicVariables=1
"""DDD"""

[TestText1]
Meter=String
MeasureName=xxxxx
Text = "xxxxx = %1"
SolidColor=220,220,220,100

[TestText2]
Meter=String
MeasureName=xxxxx2
Text = "xxxxx2 = %1"
Y=20
SolidColor=220,220,220,100




-------------------------------------------------[Log Base]---------------------------------------------------

[CLC_Num1]
Measure=Calc
Formula=(#LogNum#-5)
DynamicVariables=1

[CLC_Num2]
Measure=Calc
Formula=(#LogNum#-4)
DynamicVariables=1

[CLC_Num3]
Measure=Calc
Formula=(#LogNum#-3)
DynamicVariables=1

[CLC_Num4]
Measure=Calc
Formula=(#LogNum#-2)
DynamicVariables=1

[CLC_Num5]
Measure=Calc
Formula=(#LogNum#-1)
DynamicVariables=1

[CLC_Num6]
Measure=Calc
Formula=(#LogNum#)
DynamicVariables=1

[CLC_NumPlus]
Measure=Calc
Formula=(#LogNum#+1)
IfEqualValue=#LogMax#
IfEqualAction=[!WriteKeyValue Variables LogNum 1][!SetVariable LogNum 0][!WriteKeyValue 6T Text "#*-5*#"][!WriteKeyValue 5T Text "#*-4*#"][!WriteKeyValue 4T Text "#*-3*#"][!WriteKeyValue 3T Text "#*-2*#"][!WriteKeyValue 2T Text "#*-1*#"][!WriteKeyValue 1T Text "#*0*#"][!Refresh]
DynamicVariables=1

[STL_Textback]
X=412
Y=12R
W=220
H=32
SolidColor=10,10,10
AntiAlias=1
UpdateDivider=-1

[STL_Text]
X=([#CURRENTSECTION#B:X]+4)
Y=([#CURRENTSECTION#B:Y]+([#CURRENTSECTION#B:H]/2))
W=([#CURRENTSECTION#B:W]-(4*2))
H=[#CURRENTSECTION#B:H]
;SolidColor=150,5,50,100
FontFace=Calibri
FontSize=9
FontColor=240,240,240
StringStyle=Normal
StringAlign=LeftCenter
ClipString=1
AntiAlias=1
DynamicVariables=1
Group=TXTLOG
UpdateDivider=1

[MSR_Date]
Measure=Time
Format=%Y/%m/%d/%H:%M:%S


----------------------------------[Black Log Box]-----------------------------------------------------


[IMG_Back]
Meter=Image
X=400
Y=0
W=240
H=320
SolidColor=50,50,50
AntiAlias=1
UpdateDivider=-1

[IMG_RB]
Meter=Image
X=([IMG_Back:X]+[IMG_Back:W]-[#CURRENTSECTION#:W]-10)
Y=([IMG_Back:Y]+[IMG_Back:H]-[#CURRENTSECTION#:H]-10)
W=74
H=28
SolidColor=10,10,10
AntiAlias=1
LeftMouseUpAction=[!Refresh]
UpdateDivider=-1
DynamicVariables=1

[IMG_R]
Meter=String
X=([#CURRENTSECTION#B:X]+([#CURRENTSECTION#B:W]/2))
MeterStyle=STL_Text
StringAlign=CenterCenter
Text=Refresh

[IMG_NB]
Meter=Image
X=([IMG_RB:X]-[#CURRENTSECTION#:W]-10)
Y=([IMG_RB:Y])
W=74
H=28
SolidColor=10,10,10
AntiAlias=1
LeftMouseUpAction=[!WriteKeyValue Variables LogNum 1][!SetVariable LogNum 0][!WriteKeyValue 6T Text "#*-5*#"][!WriteKeyValue 5T Text "#*-4*#"][!WriteKeyValue 4T Text "#*-3*#"][!WriteKeyValue 3T Text "#*-2*#"][!WriteKeyValue 2T Text "#*-1*#"][!WriteKeyValue 1T Text "#*0*#"][!Refresh]
UpdateDivider=-1
DynamicVariables=1

[IMG_N]
Meter=String
X=([#CURRENTSECTION#B:X]+([#CURRENTSECTION#B:W]/2))
MeterStyle=STL_Text
StringAlign=CenterCenter
Text=Clear

[1TB]
Meter=Image
MeterStyle=STL_Textback
Y=12

[2TB]
Meter=Image
MeterStyle=STL_Textback

[3TB]
Meter=Image
MeterStyle=STL_Textback

[4TB]
Meter=Image
MeterStyle=STL_Textback

[5TB]
Meter=Image
MeterStyle=STL_Textback

[6TB]
Meter=Image
MeterStyle=STL_Textback

[1T]
Meter=String
MeterStyle=STL_Text
Text=#0#

[2T]
Meter=String
MeterStyle=STL_Text
Text=#-1#

[3T]
Meter=String
MeterStyle=STL_Text
Text=#-2#

[4T]
Meter=String
MeterStyle=STL_Text
Text=#-3#

[5T]
Meter=String
MeterStyle=STL_Text
Text=#-4#

[6T]
Meter=String
MeterStyle=STL_Text
Text=#-5#




\@Resources\log.inc

Code: Select all

[Variables]