It is currently October 26th, 2021, 12:07 pm

OnRefreshAction

Help with creating, editing & fixing problems with skins
User avatar
death.crafter
Posts: 1070
Joined: April 24th, 2021, 8:13 pm

Re: OnRefreshAction

Post by death.crafter »

sl23 wrote: August 30th, 2021, 2:42 pm Ah, I think the cause might be due to using relative positioning?
You shouldn't define meter=string in include file.
from the Realm of Death
My Current Desktop
User avatar
sl23
Posts: 893
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: OnRefreshAction

Post by sl23 »

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 :o

It was getting very tedious keep trying to copy paste everything to every skin file! :yawn:

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 :rofl:
User avatar
death.crafter
Posts: 1070
Joined: April 24th, 2021, 8:13 pm

Re: OnRefreshAction

Post by death.crafter »

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 :o

It was getting very tedious keep trying to copy paste everything to every skin file! :yawn:

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 :rofl:
Okay, then do something like,

Code: Select all

[Rainmeter]
OnRefreshAction=[!SetOption SomeMeter MeterStyle "SomeStyle"][!UpdateMeter SomeMeter]
Wait you were doing it from the beginning. So just stick to that.
Last edited by death.crafter on August 30th, 2021, 3:26 pm, edited 1 time in total.
from the Realm of Death
My Current Desktop
User avatar
sl23
Posts: 893
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: OnRefreshAction

Post by sl23 »

Ok, one last attempt, then I'll concede to defeat! :Whistle

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]
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!
User avatar
sl23
Posts: 893
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: OnRefreshAction

Post by sl23 »

death.crafter wrote: August 30th, 2021, 3:26 pm Okay, then do something like,

Code: Select all

[Rainmeter]
OnRefreshAction=[!SetOption SomeMeter MeterStyle "SomeStyle"][!UpdateMeter SomeMeter]
Wait you were doing it from the beginning. So just stick to that.
Already thought about it :D
Note: The [Rainmeter] section does not support Dynamic Variables or changes using the !SetOption bang, with the exception of custom Context menu items.
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.
Last edited by sl23 on August 30th, 2021, 3:29 pm, edited 1 time in total.
User avatar
death.crafter
Posts: 1070
Joined: April 24th, 2021, 8:13 pm

Re: OnRefreshAction

Post by death.crafter »

sl23 wrote: August 30th, 2021, 3:27 pm Already thought about it :D
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
My Current Desktop
User avatar
sl23
Posts: 893
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: OnRefreshAction

Post by sl23 »

It worked, why, I don't know, seeing as the manual says it shouldn't?

Thanks dc :thumbup:
User avatar
death.crafter
Posts: 1070
Joined: April 24th, 2021, 8:13 pm

Re: OnRefreshAction

Post by death.crafter »

sl23 wrote: August 30th, 2021, 3:35 pm It worked, why, I don't know, seeing as the manual says it shouldn't?

Thanks dc :thumbup:
What worked?
from the Realm of Death
My Current Desktop
User avatar
death.crafter
Posts: 1070
Joined: April 24th, 2021, 8:13 pm

Re: OnRefreshAction

Post by death.crafter »

sl23 wrote: August 30th, 2021, 3:35 pm It worked, why, I don't know, seeing as the manual says it shouldn't?

Thanks dc :thumbup:
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
My Current Desktop
User avatar
sl23
Posts: 893
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: OnRefreshAction

Post by sl23 »

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!

Code: Select all

OnRefreshAction=[!SetOption #Title# MeterStyle "sAllText | sContents"][!SetOption #Title# FontColor "#Color4#"] [!UpdateMeter #Title#][!Redraw]
Ah! ok, perhaps I should've read a bit more :rofl: