Example
Code: Select all
[Rainmeter]
Update=1000
ContextTitle=Run Notepad
ContextAction=["Notepad.exe"]
ContextTitle2=Run Calculator
ContextAction2=["Calc.exe"]
ContextTitleN may be any string of text, up to 30 characters. Longer titles will be clipped with trailing ellipsis (...).
ContextActionN may be any valid action option, including bangs, such as those used in mouse actions and IfActions. Both ContextTitle and ContextAction are required for each custom item, except for separators (see below).
Some other rules:
- Both ContextTitleN and ContextActionN fully support dynamic variables, including the new section variables. Titles will use the current value of a variable at the time the context menu is opened. Actions will use the current value when the item is clicked. (Watch out for this if you're using the same variable in both a title and an action, since the value may change between opening the context menu and clicking the item.)
- 3 or fewer custom items appear in the "top-level" menu, under a heading of "Custom skin actions." 4 or more custom items appear in a submenu called "Custom skin actions."
- ContextTitleN and ContextActionN may be changed with !SetOption, as in !SetOption Rainmeter ContextTitleN "New Title". If a ContextTitleN or ContextActionN option is set as blank, as in !SetOption Rainmeter ContextTitleN "" or simply ContextTitleN=, the item is disabled, as are all subsequent items. In other words, if ContextTitle3 is blank, then ContextTitle4, ContextTitle5, etc. will not be shown.
- If ContextTitleN contains only dashes, such as ContextTitle3=-----, the item will appear as a separator. Separators are not shown with 3 or fewer items, and they do count toward the 15-item limit. Separators do not require a corresponding ContextActionN.
While there are no formal restrictions on either titles or actions, we encourage skin authors to use custom context menu items wisely, in order to avoid confusing users. For example, you should not use item names that are already used in Rainmeter's built-in context items, such as "Edit settings" or "Exit".
Documentation
This feature is fully documented in the beta manual, which includes a working example skin.