!Bangs are used as the result of some "action", and can't simply be used on their own. In addition, Meters can't have an "action". That must be done in the context of a Measure (or the Rainmeter) section of the skin.
Measures are the components that "measure" or "act". Meters can only "display".
Now as written this is not particularly useful. The Calc measure I added is only to demonstrate how you use !Bangs in the context of some "action".
Re: Help with !SetVariable
Posted: January 31st, 2021, 5:19 pm
by Xdominanta
Thank you very much!
Re: Help with !SetVariable
Posted: January 31st, 2021, 5:20 pm
by balala
jsmorley wrote: ↑January 31st, 2021, 4:15 pm
!Bangs are used as the result of some "action", and can't simply be used on their own. In addition, Meters can't have an "action". That must be done in the context of a Measure (or the Rainmeter) section of the skin.
Xdominanta wrote: ↑February 6th, 2021, 7:05 pm
I'm probably not the best student, but could you please explain why !SetOption in the commented section works, but
!SetVariable no
Because when you set a variable with a !SetVariable bang, you have to set on the dynamic variables onto any measure or meter where you want to use the variable, adding a DynamicVariables=1 option. !SetOption does work even if you don't add the DynamicVariables option, because Rainmeter sets the appropriate measure or meter dynamic for one update cycle, even if you explicitely don't add the option.
So long story short, add the DynamicVariables=1 option to the [MeterValueCPU] meter if you want to use the dynamically set variable onto it. Don't add it, if you set dynamically an option (through the !SetOption bang).