It is currently September 10th, 2024, 4:42 pm
RoundLineMeter Location
-
- Posts: 445
- Joined: March 17th, 2011, 4:54 am
RoundLineMeter Location
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?
-
- Rainmeter Sage
- Posts: 16513
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: RoundLineMeter Location
I don't belive that simply removing the parentheses has any importance. I'd be curious about your code. Could you please post it?
-
- Posts: 445
- Joined: March 17th, 2011, 4:54 am
Re: RoundLineMeter Location
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?
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?
-
- Rainmeter Sage
- Posts: 16513
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: RoundLineMeter Location
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: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?
Code: Select all
[MeasureLNO]
Measure=Calc
Formula=#LNO#
IfCondition=(MeasureLNO=1)
IfTrueAction=[!ShowMeterGroup "LauncherD"]
IfFalseAction=[!HideMeterGroup "LauncherD"]
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.
-
- Developer
- Posts: 22726
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RoundLineMeter Location
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).
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).
-
- Posts: 445
- Joined: March 17th, 2011, 4:54 am
Re: RoundLineMeter Location
Thank You. it works great!
-
- Posts: 445
- Joined: March 17th, 2011, 4:54 am
Re: RoundLineMeter Location
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?
-
- Rainmeter Sage
- Posts: 16513
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: RoundLineMeter Location
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"].
-
- Posts: 445
- Joined: March 17th, 2011, 4:54 am
Re: RoundLineMeter Location
No , meant a group of meters and an @Include that uses the variable to define the name of the included skin.
-
- Rainmeter Sage
- Posts: 16513
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: RoundLineMeter Location
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?bill98 wrote:No , meant a group of meters and an @Include that uses the variable to define the name of the included skin.
If I am, you should use the following form of the 'WriteKeyValue bang: [!WriteKeyValue VariableYouWantToModify "NewValue" [b][i]"#@#Settings.inc"[/i][/b]]. 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?