It is currently February 25th, 2021, 10:58 pm

Variable reference not being resolved

Get help with installing and using Rainmeter.
jn_meter
Posts: 82
Joined: December 27th, 2016, 12:04 pm

Variable reference not being resolved

Post by jn_meter »

This does not work:

Code: Select all

action_processTop_disable=[!DisableMeasure measure_processTop]
action_cpu_usage_lowest=[#action_processTop_disable#]]
But this does:

Code: Select all

action_cpu_usage_lowest=[!DisableMeasure measure_processTop]
That is: in the first snippet, the reference, in action_cpu_usage_lowest, to action_processTop_disable, is not being resolved, even though similar formulations elsewhere in the code do get resolved. Why?
User avatar
jsmorley
Developer
Posts: 21546
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Variable reference not being resolved

Post by jsmorley »

jn_meter wrote: February 14th, 2021, 2:14 pm This does not work:

Code: Select all

action_processTop_disable=[!DisableMeasure measure_processTop]
action_cpu_usage_lowest=[#action_processTop_disable#]]
But this does:

Code: Select all

action_cpu_usage_lowest=[!DisableMeasure measure_processTop]
That is: in the first snippet, the reference, in action_cpu_usage_lowest, to action_processTop_disable, is not being resolved, even though similar formulations elsewhere in the code do get resolved. Why?
You don't want two sets of [[]] brackets on the bang.

[Variables]
action_processTop_disable=[!DisableMeasure measure_processTop]
action_cpu_usage_lowest=#action_processTop_disable#

or:

[Variables]
action_processTop_disable=!DisableMeasure measure_processTop
action_cpu_usage_lowest=[#action_processTop_disable#]
jn_meter
Posts: 82
Joined: December 27th, 2016, 12:04 pm

Re: Variable reference not being resolved

Post by jn_meter »

Ah, of course. Thank you very much.

That leaves me https://forum.rainmeter.net/viewtopic.php?f=103&t=36934.