It is currently April 14th, 2021, 2:51 am

Action on Refresh, but not on Load

Tips and Tricks from the Rainmeter Community
User avatar
Posts: 142
Joined: May 12th, 2019, 8:55 am

Action on Refresh, but not on Load

Post by Cariboudjan »

For how to do an action on Load but not on Refresh, see here.

The below will do the opposite. It will execute a command when refreshed, but unlike OnRefreshAction, it will not execute on the skin's initial load.

Code: Select all

;When skin is opened, the variable is written (but not set) as 0. When closed, it is reverted back to 1.
OnRefreshAction=[!WriteKeyValue Variables SkinClosed 0]
OnCloseAction=[!WriteKeyValue Variables SkinClosed 1]

;Below variable is 1 when the skin is closed, and 0 when the skin is open

;Below condition is always true, but is disabled until #SkinClosed# equals 0, which it will not unless it is opened, and then refreshed. Therefor, the action will only occur when a skin is refreshed, but not when initially loaded.