RoundLineMeter Location

Help with creating, editing & fixing problems with skins

RoundLineMeter Location

February 11th, 2016, 3:33 am
bill98
   [445 posts]

If this is explained somewhere, I sure missed it. I was changing the x-location of a RoundLineMeter when it suddenly jumped. I originaly had defined x via an equation like this: x=(Equation). I changed x to be defined via a variable, like: x=(#Variable name#). Then I cleaned it up and removed the parentheses, so I had: x=#Variable name#. That is when my RoundLineMeter jumped off the screen. Why? What is the siginficance of parentheses?
User avatar

Re: RoundLineMeter Location

February 11th, 2016, 7:12 am
balala
Rainmeter Sage   [6671 posts]

I don't belive that simply removing the parentheses has any importance. I'd be curious about your code. Could you please post it?

Re: RoundLineMeter Location

February 11th, 2016, 11:41 am
bill98
   [445 posts]

Oh boy, that's dumb. I didn't write down which meter it was and I have been making so many changes, I forgot. I do have another question though.

I have the following trigger which doesn't execute correctly:
LeftMouseUpAction=[!WriteKeyValue Variables "LNO" "1"][!ReFresh][!ShowMeterGroup "LauncherD"]

Group LauncherD only opens for a fraction of a second and then closes. I assume the Refresh action is closing it. Is there some other way to write this or add a delay between the ReFresh and ShowMeterGroup LauncherD?
User avatar

Re: RoundLineMeter Location

February 11th, 2016, 2:55 pm
balala
Rainmeter Sage   [6671 posts]

bill98 wrote:Group LauncherD only opens for a fraction of a second and then closes. I assume the Refresh action is closing it. Is there some other way to write this or add a delay between the ReFresh and ShowMeterGroup LauncherD?

You're right. When you click, the !ShowMeterGroup bang will show the group, but the skin is immediately refreshed and this, I suppose, will hide the group (if I'm not wrong you have set a Hidden=1 option on the meters of that group, or otherwise hid them). I think the following calc measure could help:

Code: Select all

[MeasureLNO]
Measure=Calc
Formula=#LNO#
IfCondition=(MeasureLNO=1)
IfTrueAction=[!ShowMeterGroup "LauncherD"]
IfFalseAction=[!HideMeterGroup "LauncherD"]

The IfFalseAction is optional and depending on your code, maybe you don't need it.
If this is a proper solution, remove the [!ShowMeterGroup "LauncherD"] bang from the LeftMouseUpAction option.
I generally try to avoid refreshing the skin. Are you sure you need to do that? Sometimes it is, but many times, it's not. To re-read the LNO variable you absolutely need it, but couldn't be replaced the !WriteKeyValue with a !SetVariable and removed the !Refresh bang? This again, largely depends on your code.
User avatar

Re: RoundLineMeter Location

February 11th, 2016, 3:04 pm
jsmorley
Developer   [17945 posts]

As balala says, you should have relatively few times you really need to use !Refresh in a skin. In any case using !Refresh should be viewed skeptically. It's the "big gun".

Even with !WriteKeyValue, which needs to have the skin refreshed to "see" any changes to skin .ini or @Include .inc files, you can often avoid a refresh with logic like:

[!SetVariable SomeVar "SomeValue"][!WriteKeyValue Variables SomeVar "SomeValue"][!UpdateMeasure *][!UpdateMeter *][!Redraw]

That way you have your cake and eat it too. You get immediate results from your change without having to refresh the entire skin, while if you DO refresh or reload the skin, the change is also "persistent'.

That is not to say there aren't times when !WriteKeyValue then !Refresh makes sense. If the change made by !WriteKeyValue impacts the entire functionality of the skin, it can be easier, and just as efficient, to just refresh the skin. However, remember that refresh is entirely destructive to any other changes that you made "in memory", like with !SetOption or !SetVariable. Refresh "starts over" as if you unloaded and reloaded the skin (with the single exception of the value of Counter).

Re: RoundLineMeter Location

February 11th, 2016, 3:56 pm
bill98
   [445 posts]

Thank You. it works great! :D :welcome: :D

Re: RoundLineMeter Location

February 13th, 2016, 9:13 pm
bill98
   [445 posts]

I appreciate the update on how to get rid of a !ReFresh. Is it possible to use this when using the changed variable in a different Group with an @Include that uses the variable also. This previously worked when the variable and @Include were in a separate skin. Is there a way to keeo it in the same skin?
User avatar

Re: RoundLineMeter Location

February 13th, 2016, 9:38 pm
balala
Rainmeter Sage   [6671 posts]

Group meaning a group of skins? If so, use the !RefreshGroup bang. Add the following bang: [!RefreshGroup "YourGroup"]. Or you can refresh just certain skin, using the following form of !Refresh: [!Refresh "YourConfig"].

Re: RoundLineMeter Location

February 13th, 2016, 10:35 pm
bill98
   [445 posts]

No , meant a group of meters and an @Include that uses the variable to define the name of the included skin.
User avatar

Re: RoundLineMeter Location

February 14th, 2016, 4:50 pm
balala
Rainmeter Sage   [6671 posts]

bill98 wrote:No , meant a group of meters and an @Include that uses the variable to define the name of the included skin.

A variable is not related o a group of meters (or measures). It's an element of the skin, which can be modified in many ways, eg using the !SetVariable bang. But I think you want to write the modified variable into an included file. Am I right?
If I am, you should use the following form of the 'WriteKeyValue bang: [!WriteKeyValue VariableYouWantToModify "NewValue" "#@#Settings.inc"]. The key here is the last parameter, which will indicate the file where the bang should write the new value (in this case the Settings.inc file, located into the @Resources folder). The Settings.inc file not even have to be necessarily included into the skin with an @Include option (but it's true that usually it is).
Is this what you wanted to achieve?

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests