[Variables]
FacPos=#Fac1# <--- this is equal to factor1's value rather than the word #Fac1#.
I'm trying to make it so that clicking the Operation symbol switches this variable to #Fac2# and then Clicking the number buttons afterwards will change the OpPos to Op2 (Not #Op2#) and so on. Anyway, it can calculate 15+0+0+0=15. Check the Button Measures for how I got multiple numbers and please, if you see any mistakes or have anyways to fix it, do not hesitate to say something. If you have any questions, also feel free to ask or even pm me.
Code: Select all
[Rainmeter]
Author=Chewtoy, Aarowaim, JlsCrazy
Update=500
BackgroundMode=2
SolidColor=128,196,255,255
DynamicVariables=1
DynamicWindowSize=1
;>>>>>>>>>>>>>>>>>>>>Variables<<<<<<<<<<<<<<<<<<<<
[Variables]
FontColor=0,0,0,255
FontFace=Tahoma
;>>>>>Factors<<<<<
FacPos=Fac1
FacActHalf1=!Execute [!RainmeterSetVariable #FacPos# (
FacActHalf2=)][!RainmeterRedraw]
FacActAlt1=)][!RainmeterSetVariable OpActHalf2 [!RainmeterRedraw]
Fac1=0
Fac2=0
Fac3=0
Fac4=0
;>>>>>Operations<<<<<
OpPos=Op1
OpActHalf1=!Execute [!RainmeterSetVariable Op1 "
OpActHalf2="][!RainmeterSetVariable FacActHalf2 #FacActAlt1#][!RainmeterSetVariable FacPos Fac2][!RainmeterRedraw]
Op1=+
Op2=+
Op3=+
;>>>>>>>>>>>>>>>>>>>>Display<<<<<<<<<<<<<<<<<<<<
;>>>>>Equation<<<<<
[DisEq]
Meter=String
Text=#Fac1##Op1##Fac2##Op2##Fac3##Op3##Fac4#
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
DynamicVariables=1
X=4
Y=4
;>>>>>Result<<<<<
[Result]
Measure=Calc
Formula=#Fac1##Op1##Fac2##Op2##Fac3##Op3##Fac4#
DynamicVariables=1
;>>>>>Buttons<<<<<
[1]
Meter=String
Text=[1]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=0r
Y=20r
LeftMouseUpAction=#FacActHalf1#[1Measure]#FacActHalf2#
[2]
Meter=String
Text=[2]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#FacActHalf1#[2Measure]#FacActHalf2#
[3]
Meter=String
Text=[3]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#FacActHalf1#[3Measure]#FacActHalf2#
[+]
Meter=String
Text=[+]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#OpActHalf1#+#OpActHalf2#
[-]
Meter=String
Text=[-]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#OpActHalf1#-#OpActHalf2#
[4]
Meter=String
Text=[4]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=-80r
Y=20r
LeftMouseUpAction=#FacActHalf1#[4Measure]#FacActHalf2#
[5]
Meter=String
Text=[5]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#FacActHalf1#[5Measure]#FacActHalf2#
[6]
Meter=String
Text=[6]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#FacActHalf1#[6Measure]#FacActHalf2#
[*]
Meter=String
Text=[*]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#OpActHalf1#*#OpActHalf2#
[/]
Meter=String
Text=[/]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#OpActHalf1#/#OpActHalf2#
[7]
Meter=String
Text=[7]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=-80r
Y=20r
LeftMouseUpAction=#FacActHalf1#[7Measure]#FacActHalf2#
[8]
Meter=String
Text=[8]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#FacActHalf1#[8Measure]#FacActHalf2#
[9]
Meter=String
Text=[9]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=#FacActHalf1#[9Measure]#FacActHalf2#
[=]
Meter=String
Text=[=]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseDownAction=!Execute [!RainmeterSetVariable Fac1 [Result]]
LeftMouseUpAction=!Execute [!RainmeterSetVariable Fac2 0][!RainmeterSetVariable Fac3 0][!RainmeterSetVariable Fac4 0][!RainmeterSetVariable Op1 +][!RainmeterSetVariable Op2 +][!RainmeterSetVariable Op1 +]
[0]
Meter=String
Text=[0]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=-60r
Y=20r
LeftMouseUpAction=#FacActHalf1#[0Measure]#FacActHalf2#
[Clear]
Meter=String
Text=[Clear]
FontFace=#FontFace#
FontColor=#FontColor#
AntiAlias=1
SolidColor=128,196,255,255
X=20r
Y=0r
LeftMouseUpAction=!Execute [!RainmeterSetVariable Fac1 0][!RainmeterSetVariable Fac2 0][!RainmeterSetVariable Fac3 0][!RainmeterSetVariable Fac4 0][!RainmeterSetVariable Op1 +][!RainmeterSetVariable Op2 +][!RainmeterSetVariable Op1 +]
;>>>>>>>>>>>>>>>>>>>>Button Calcs<<<<<<<<<<<<<<<<<<<<
[1Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+1 : 1)
DynamicVariables=1
[2Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+2 : 2)
DynamicVariables=1
[3Measure]
Measure=Calc
Formula=#Fac1# > 0 ? (#Fac1#*10)+3 : 3
DynamicVariables=1
[4Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+4 : 4)
DynamicVariables=1
[5Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+5 : 5)
DynamicVariables=1
[6Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+6 : 6)
DynamicVariables=1
[7Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+7 : 7)
DynamicVariables=1
[8Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+8 : 8)
DynamicVariables=1
[9Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+9 : 9)
DynamicVariables=1
[0Measure]
Measure=Calc
Formula=(#Fac1# > 0 ? (#Fac1#*10)+0 : 0)
DynamicVariables=1