Rainmeter Samurize utilities forum

& mods

Plugins / mods for the Rainmeter desktop widget app

Rainmeter Macro mod

This mod (modified Rainmeter) is a custom build, which adds code macros. A macro is a way to programmatically expand code. This mod offers these features:

  • Copies: measures and meters dynamically created from a single template
  • Tables: table layout for data that needs to be shown as a table
  • Name tokens: names of measures and meters automatically broken into smaller pieces, so they can be used to reference other elements
  • Line spacing: adjustable distance between lines of text
  • Fixes a bug in Rainmeter for correct meter display


Demo spectrum analyzer

Rainmeter often needs repeating chunks of code, e.g. for forecast days in a weather skin, bars in a spectrum analyzer etc. This mod can automatically create such copies from one template: a single "master" element (measure or meter).

To make copies from the template, add a property called "Copies=", specifying how many copies you want. This mod will replace the template with copies. In the template's name (and wherever else within the template you wish), use a macro variable called <COPY>. When copies are created, <COPY> will contain the current copy number, starting at 0. For 5 copies, <COPY> will range from 0 to 4. This variable can be used to adjust the position of each copy, to access indexes etc. This sample skin (download below) creates a 14-bar spectrum analyzer from just 2 templates: an AudioLevel band measure and a bar meter (19 lines).



Note: this mod creates measures or meters that do not exist directly in the code. If you want to access them at runtime, refer to the numbered copies, not the template (it won't exist anymore). Copies (and the <COPY> variable) apply only to the template element they're in. If you want two sets of interacting copies, create an equal number of copies from two templates.

Right now, there's a hard-coded sanity check of 128 copies maximum, so you don't end up with 1000s of copies by typing an extra digit.


Numeric data (e.g. crypto balances) often require display in a table. To avoid the drudgery of laying out all the info in a table, this mod can create a table of data from a single template meter.

To create a table from a template meter, add properties called "Rows=" and "Columns=", specifying the table dimensions you want. This mod will replace the template with a copy for each table cell. In the template's name (and wherever else within the template you wish), use macro variables called <ROW> and <COL>. When copies are created, <ROW> and <COL>will contain the current row and column numbers, starting at 0. For 5 rows <ROW>, will range from 0 to 4. These variables can be used to adjust the position of each copy, to access indexes etc. The sample skin in the CoinTracking plugin shows data as a table.

Text=Custom info for row <ROW>, column <COL>

Name tokens

For a skin that's easy to maintain, you need a consistent, uniform naming scheme for measures and meters, e.g. mCoin0Value, mCoin0Gain. This way, elements can be cross-referenced. To make this easy, this mod splits the name of an element into tokens (smaller bits), which can be used as variables to refer to other elements. The meter name is broken into tokens as follows:

  • The beginning of the name starts a token of lowercase letters
  • A capital letter starts a token of lowercase letters
  • A digit starts a token of a series digits
  • Optionally, separators can be used: "." (a period), "_" or "-" (a hyphen)
Token examples


m | Coin | 12 | Value


m | Day | 5 | Temp


measure | Separated | By | Seperators

This mod supports 8 tokens. To access them, use variables called #SEC... (short for "section name"), ranging from #SEC0#, #SEC1#... to #SEC7#. The last token (whatever its actual index) is always stored as #SECLAST#.

This code example below uses a table layout. It shows how the table cells correctly report their row and column indexes with section name tokens.

Token demonstration


Line spacing

To use less screen space, this mod can reduce the spacing between lines of text. Use InlineSetting, and add a 4th parameter to CharacterSpacing: 1=100% (default line spacing), 0.85=85% etc.

InlineSetting=CharacterSpacing | 0 | 0 | -1 | 0.85	


Change log:

First release: copy macro added

Fixed a meter bug in the meter official Rainmeter

Added tables and name tokens

Added line spacing adjustment

"Macro mod" added to differentiate this build from the official release.

Macro mod

Rainmeter_x64_4.4.2.0_macro_mod.zip (2.6 MB)

Rainmeter_x32_4.4.2.0_macro_mod.zip (2.1 MB)

Demo skins (incl. a 14-bar spectrum analyzer and the WeatherHub forecast skin converted to uses copies (i.e. it works with this mod):

Macro_mod_demo_skins_1.1.rmskin (4 KB)

Released under GNU GPL 2
Source code available on request.