It is currently August 19th, 2022, 7:28 pm

Need help using ActionTimer, Loop and/or Calc measures to edit multiple variables

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 14469
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help using ActionTimer, Loop and/or Calc measures to edit multiple variables

Post by balala »

MattNY177 wrote: July 30th, 2022, 12:36 am I guess it had something to do with !Update vs !Update meter. Do you have a tip jar or something?
I doubt. [!Update] updates the whole skin, while [!UpdateMeter "MyMeter"] updates only the [MyMeter] meter. When applied [!Update] got the whole skin updated. Since the [InsertBox] meter is part of the skin, you should have to got it updated as well.
On the other hand even if nothing would have been updated with bangs, since the skin is updated "normally", the meter had been updated regularly, so even with no update bang should have got it updated. So don't really know, but I think it was a small inattention of your, so you maybe didn't realize the update has been done.
MattNY177 wrote: July 30th, 2022, 12:36 am
  • Did it have anything to do with using !SetVariable after !WriteKeyValue? Does the order of these commands matter when applying to the same variable?
No, at all. The order of these bangs doesn't matter, using both bangs to get an immediate and a permanent setting of the variable / option is a quite frequently used technique. You have a short description of it here.
MattNY177 wrote: July 30th, 2022, 12:36 am
  • Was using OnChangeAction the only way to achieve this result? Why couldn't the same thing be achieved with IfConditions after updating the Calc measure during each cycle of the ActionTimer measure?
No, probably not. There are extremely less cases when something can be done in one single way. This for sure is not a such one.
In this particular case, the IfCondition is executed only once, when the cycle is finished, because only at such a moment the condition becomes true. The bangs of the IfTrueAction option are not proper to do what should be done, so it should have to be rewritten. And even if you do this, an IfConditionMode=1 option should be added to the measure, because if this option is not added, the IfTrueAction is executed only once, when you got the condition true. With IfConditionMode, the IfTrueAction is executed on every update of the measure, while the condition is meet.
However I believe the OnChangeAction is the simplest solution (at least I think it is).
MattNY177 wrote: July 30th, 2022, 12:36 am
  • Could this also have been done using a Loop measure? In theory that seems like the most applicable tool for this scenario, versus a calc measure with Formula=#variable#-1
Probably yes, but I'm not using Loop measures. Introducing such a measure a while ago was completely useless in my opinion, I used such measures only for tryout.
MattNY177 wrote: July 30th, 2022, 12:36 am Again I'm just trying to learn these little nuances, so I appreciate any insight to help me increase my proficiency.
This is the basic idea of this forum. Feel free to ask if there is anything you can't understand, we're glad to help when we can.