The only imperfection I have is that the variable #Sensitivity# is always lagging by 5; I see with the meter that it's value change on the fly (aka every wheel scroll action) but always one scroll later inside the AudioVariables.inc file, thus lagging 5.
What am I missing?
mak_kawa wrote: ↑September 20th, 2020, 11:40 pm
Hi brax64
I am not fully sure about variable update timing
...
As always, sorry if I am misunderstanding.
Hi mak_kawa
Thanks for your quick reply, well your trick it's actually working, but I'm not understanding the logic...
I'm surely missing something about the whole mechanic behind the scene on how/when Rainmeter is doing its thing...
[!WriteKeyValue Variables SomeVar (Some modify to #SomeVar#)][!SetVariable SomeVar (Some modify to #SomeVar#)]
Again I am not sure why these bangs don't work as; "#SomeVar# is updated -> the updated value for already updated #SomeVar# value is written", if the description order of bangs doesn't matter.
[!WriteKeyValue Variables SomeVar (Some modify to #SomeVar#)][!SetVariable SomeVar (Some modify to #SomeVar#)]
Again I am not sure why these bangs don't work as; "#SomeVar# is updated -> the updated value for already updated #SomeVar# value is written", if the description order of bangs doesn't matter.
You're on point, that's exactly what I meant with "I don't understand the logic" in my answer...
Hope that some sage/developer can shed some light about this!
All variables are resolved when the entire action is read on each update. You can't change the value of a variable and use the new value in the same action.
The bangs you put in any given action do happen in "order", but all within the same update cycle. One way to look at it is that they all happen "at once". They don't actually, but really in a sense they might as well.
Thank you for clarification. I've maybe heard it from you in some thread... sorry for my amnesia.
Bangs in one action are executed "at once"... I will never forget it, I wish.
jsmorley wrote: ↑September 21st, 2020, 2:26 am
All variables are resolved when the entire action is read on each update. You can't change the value of a variable and use the new value in the same action.
The bangs you put in any given action do happen in "order", but all within the same update cycle. One way to look at it is that they all happen "at once". They don't actually, but really in a sense they might as well.
I just wanted to clarify one small thing with this. A regular #variable# will only be resolved when the action is resolved (during the update cycle).....however, using nested syntax [#variable], you can set a variable and use the new value later with another bang within the same action.
Brian wrote: ↑September 21st, 2020, 4:51 am
I just wanted to clarify one small thing with this. A regular #variable# will only be resolved when the action is resolved (during the update cycle).....however, using nested syntax [#variable], you can set a variable and use the new value later with another bang within the same action.
Brian wrote: ↑September 21st, 2020, 4:51 am
I just wanted to clarify one small thing with this. A regular #variable# will only be resolved when the action is resolved (during the update cycle).....however, using nested syntax [#variable], you can set a variable and use the new value later with another bang within the same action.
Interesting. I had never tumbled to the implications of that in this context.
LeftMouseUpAction=[!About][!Log [#Var]][!SetVariable Var "([#Var]+1)"][!Log [#Var]]
Do keep in the back of your mind that using nested variables, while extremely useful, will cause just a hair more work by Rainmeter on each update. My advice is to use them where you need them, and use the old-style variables and section variables where they will do the trick. The additional hit is so small individually that it rounds to zero, but these things can add up in a large and complicated skin.