# Measures

## NUOL measure

A NUOL measure is a disabled measure which when updated executes a bang.&#x20;

```
[Rainmeter]
OnRefreshAction=[!Delay 20][!EnableMeasureGroup NUOL]
; having a delay prevents the measures from updating & executing when the module is first loaded

[ACTIONHELLOWORLD]
Measure=Calc        ; Any unreactive measure type is fine
OnUpdateAction=[!Log "HelloWorld!"]     ; can be any action
Group=NUOL
Disabled=1
```

And to call this bang, you can simply update the measure with \
`!UpdateMeasure ACTIONHELLOWORLD`&#x20;

But why not just call a variable with a bang value? That will work... but only when called in the currentconfig. Using a NUOL measure you can call the bangs from a different config with\
`!UpdateMeasure ACTIONHELLOWORLD "MainConfigName\Main"`

## mToggle measure

{% hint style="warning" %}
mToggle measures are used in most hotkey modules toggle\
It is not recommended to use mToggle anymore, instead, use lua to achieve better results
{% endhint %}

A mToggle measure is a measure which when called toggles and execute actions.\
We'll be using NUOL measures to support calling functions from different configs.

```
[mToggle]
Measure=Calc
Formula=1 - mToggle            ; every time the measure updates, the value toggles
IfCondition=mToggle = 0
IfTrueAction=[!UpdateMeasure ACTIONLOAD]
IfFalseAction=[!UpdateMeasure ACTIONUNLOAD]
```

{% hint style="info" %}
The default value of mToggle is always 1, and you cannot have it default 0.&#x20;
{% endhint %}

This mToggle works, but you are unable to set it to either value with an action. Therefore, we'll be needing another measure to set mToggle's value: **mToggleSet**

```
[mToggleSet]
Measure=Calc
Formula=mToggle
IfCondition=mToggle = 0                ; This allows the measure to always set mToggle's value to 1
iftrueaction=[!UpdateMeasure mToggle]
ifconditionmode=1
Group=NUOL
Disabled=1
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.jaxcore.app/coding-a-module/measures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
