You shouldn't define meter=string in include file.
It is currently March 29th, 2024, 11:18 am
OnRefreshAction
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: OnRefreshAction
Oh, why's that? That is the main reason for using the INC file, to contain all the meters which are the same across all skin files!
Nearly 1000 lines of code
It was getting very tedious keep trying to copy paste everything to every skin file!
Also, if I can't use Meter=String in there, it defeats the purpose of me trying to get this code in there in the first place
Nearly 1000 lines of code
It was getting very tedious keep trying to copy paste everything to every skin file!
Also, if I can't use Meter=String in there, it defeats the purpose of me trying to get this code in there in the first place
- MuLab -
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: OnRefreshAction
Okay, then do something like,sl23 wrote: ↑August 30th, 2021, 2:53 pm Oh, why's that? That is the main reason for using the INC file, to contain all the meters which are the same across all skin files!
Nearly 1000 lines of code
It was getting very tedious keep trying to copy paste everything to every skin file!
Also, if I can't use Meter=String in there, it defeats the purpose of me trying to get this code in there in the first place
Code: Select all
[Rainmeter]
OnRefreshAction=[!SetOption SomeMeter MeterStyle "SomeStyle"][!UpdateMeter SomeMeter]
Last edited by death.crafter on August 30th, 2021, 3:26 pm, edited 1 time in total.
from the Realm of Death
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: OnRefreshAction
Ok, one last attempt, then I'll concede to defeat!
Can I use something like this [!SetOption "#CURRENTSECTION#\#CURRENTSECTION#.ini" MeterStyle "sAllText | sContents"][!SetOption "#CURRENTSECTION#\#CURRENTSECTION#.ini" FontColor "#Color4#"]
I see the problem with this:
It is performing the SetOption before loading the new skin. It works if I click on the new skin. I tried the [!Delay 500] after the !ActivateConfig, but it still has no effect on the new skin as the click was on the old one!
Can I use something like this [!SetOption "#CURRENTSECTION#\#CURRENTSECTION#.ini" MeterStyle "sAllText | sContents"][!SetOption "#CURRENTSECTION#\#CURRENTSECTION#.ini" FontColor "#Color4#"]
I see the problem with this:
Code: Select all
LeftMouseUpAction=[!ActivateConfig "SegoeFluentIcons" "#CURRENTSECTION#.ini"][!SetOption #CURRENTSECTION# MeterStyle "sAllText | sContents"][!SetOption #CURRENTSECTION# FontColor "#Color4#"] [!UpdateMeter #CURRENTSECTION#][!Redraw]
- MuLab -
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: OnRefreshAction
Already thought about itdeath.crafter wrote: ↑August 30th, 2021, 3:26 pm Okay, then do something like,
Wait you were doing it from the beginning. So just stick to that.Code: Select all
[Rainmeter] OnRefreshAction=[!SetOption SomeMeter MeterStyle "SomeStyle"][!UpdateMeter SomeMeter]
The reason to move the code to the INC was just for easier editing and additions later on. The skin is meant to be extended with further items as it's a sort of reference utility for icons in the SegoeFluent font.Note: The [Rainmeter] section does not support Dynamic Variables or changes using the !SetOption bang, with the exception of custom Context menu items.
Last edited by sl23 on August 30th, 2021, 3:29 pm, edited 1 time in total.
- MuLab -
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: OnRefreshAction
Contrary to belief, it can.
Use nested variable syntax.
And btw, why do you need dynamic variables in the first place?
from the Realm of Death
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: OnRefreshAction
It worked, why, I don't know, seeing as the manual says it shouldn't?
Thanks dc
Thanks dc
- MuLab -
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: OnRefreshAction
https://docs.rainmeter.net/manual/variables/nesting-variables/
One difference is that when the Nesting Variables syntax is used in bangs, the values are always dynamically resolved when they are used, including in the [Rainmeter] section of the skin. This is different than the standard #VarName# syntax, which will always require DynamicVariables=1 when the value changes, and can't be dynamic in [Rainmeter]. This difference only applies to use in bangs. When used in option values, DynamicVariables=1 must still be set on the measure or meter if the value changes.
from the Realm of Death
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: OnRefreshAction
Haha! I just tried what you said and it worked. I thought I'd try using a variable to make editing easier, and that worked too!
Ah! ok, perhaps I should've read a bit more
Code: Select all
OnRefreshAction=[!SetOption #Title# MeterStyle "sAllText | sContents"][!SetOption #Title# FontColor "#Color4#"] [!UpdateMeter #Title#][!Redraw]
- MuLab -