Hi, I'm sure this is an easy problem to solve , but I've just started out Raimetering and right now can't make head or tail of a large part of the RM docs. ( & )
So, this is basically what I want to achieve:
1. User clicks on a skin element (element completed).
2. This changes the value of a variable. (variable stored in a config file.)
3. Then skin refreshes, now using the new value.
It's the 2nd step that has me stumped.
A bonus problem: I'd also like to know how to use another (constant) variable value to change said variable.
Thank you in advance for any help at all.
It is currently May 7th, 2024, 6:02 pm
How do I calculate new variable value?[solved]
-
- Posts: 12
- Joined: January 21st, 2013, 4:37 am
- Location: AFK
How do I calculate new variable value?[solved]
Last edited by SammaySarkar on January 22nd, 2013, 2:31 pm, edited 2 times in total.
Please turn on Handwriting Recognition to view signatures.
-
- Posts: 1740
- Joined: November 13th, 2012, 9:53 pm
Re: How do I calculate new variable value?
http://docs.rainmeter.net/manual/bangs#WriteKeyValue
•)
Code: Select all
LeftMouseUpAction=[!WriteKeyValue "Variables" "TheVariableYouWantToChange" "#AnotherVariable#" "#@#Variables.inc"][!Refresh "#CURRENTCONFIG#"]
-
- Posts: 12
- Joined: January 21st, 2013, 4:37 am
- Location: AFK
Re: How do I calculate new variable value?
Thanks.moshi wrote:http://docs.rainmeter.net/manual/bangs#WriteKeyValue
•)Code: Select all
LeftMouseUpAction=[!WriteKeyValue "Variables" "TheVariableYouWantToChange" "#AnotherVariable#" "#@#Variables.inc"][!Refresh "#CURRENTCONFIG#"]
But this is not quite what I need.
let's say that, on every click, I want to add 10 to "TheVariableIWantToChange". But I may also need to add something like(10+another variable) too.
And just for now, a code block would be fine...
Please turn on Handwriting Recognition to view signatures.
-
- Posts: 1740
- Joined: November 13th, 2012, 9:53 pm
Re: How do I calculate new variable value?
Code: Select all
[Calculation]
Measure=Calc
Formula=((#TheVariableYouWantToChange#)+10)
DynamicVariables=1
UpdateDivider=-1
[Meter]
...
LeftMouseUpAction=[!WriteKeyValue "Variables" "TheVariableYouWantToChange" "[Calculation]" "#@#Variables.inc"][!Refresh "#CURRENTCONFIG#"]
•)
-
- Posts: 12
- Joined: January 21st, 2013, 4:37 am
- Location: AFK
Re: How do I calculate new variable value?
Thanks a lot! This is exactly what I was looking for !
This is what I did.
Thanks again! This was alomst making my hairs go grey.
Code: Select all
[Calculation]
Measure=Calc
Formula=((#TheVa ... #CURRENTCONFIG#"]
Code: Select all
[latmove]
Measure=calc
Formula=(#Latitude#+10)
[moveL]
Meter=Button
ButtonImage=move.png
X=(#Height#-10)
Y=(5+(#height#/2))
LeftMouseUpAction=[!WriteKeyValue "Variables" Latitude [latmove] "uservariables.inc"][!Refresh "#CURRENTCONFIG#"]
Please turn on Handwriting Recognition to view signatures.