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.
[Rainmeter]
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
[Variables]
SkinClosed=1
;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.
[CheckIfSkinIsOpen]
Measure=Calc
IfCondition=1=1
IfTrueAction=EXECUTE SOME COMMANDS
Disabled=#SkinClosed#