Dynamic Cheat Sheet


When you want to use the current value of a Variable, Built-in Variable, Section Variable, or Measure name anywhere in a Measure or Meter or Bang in Rainmeter, It is important to know when that value is automatically treated as "dynamic" (always reflects the current value) or needs to be resolved dynamically when used, with the DynamicVariables=1 option.

The following is a "cheat sheet" for the rules that apply in different situations.

Dynamic "Variables":

If you want to reference the current value of a Variable in a meter or measure, and that variable is dynamically set or changed with !SetVariable, you must use DynamicVariables on the meter or measure using it.

When using Built-in Variables, most of them are of a static nature and do not require DynamicVariables. However, several of them, in particular Current Config size and position and Monitor Variables, are dynamic, and always require DynamicVariables to use the values.

Dynamic "Measures":

If you want to reference the value of a measure in a meter or measure, then you must enclose the measure name in [] and have DynamicVariables=1 on the meter or measure using it. This uses the string value of the measure as a Section Variable.

Exceptions:

  • If you are "binding" a measure to a meter with the MeasureName option, you don't need either [] or DynamicVariables.
  • If you are "binding" a parent WebParser measure to a child measure with the URL option, you need the [], but not DynamicVariables.
  • If you reference measures other than the parent in the URL option of a WebParser measure, a special [&MeasureName] Section Variable with [] and DynamicVariables must be used.

  • The Formula option in a Calc measure and the IfCondition measure option (Rainmeter 3.1 or later) do not require either [] or DynamicVariables when referencing measures. Section Variables, Variables and Built-in Variables follow the normal rules in these options.

Dynamic "Bangs":

Measures in a (formula), Section Variables, Variables, or Built-in Variables used in any Bang do not require DynamicVariables. Things in Bangs are just always resolved dynamically.

If the !SetOption bang is used with Any Measure in a (formula), Section Variable, Variable, or Built-in Variable, the meter or measure that is being changed is automatically made dynamic for one update. If the !SetOption is done on every update, then DynamicVariables is not needed on that target meter or measure.