It is currently April 19th, 2024, 2:37 pm

Interrupt a !bang?

Get help with creating, editing & fixing problems with skins
User avatar
Cariboudjan
Posts: 268
Joined: May 12th, 2019, 8:55 am

Re: Interrupt a !bang?

Post by Cariboudjan »

balala wrote: January 6th, 2020, 9:26 pm Take care, the [!SetVariable MouseOverMeter #CURRENTSECTION#] bang used into the [Style] section is completely wrong. [Style] is a meter style (used into meters like [1] - [5]). Meters don't have a value and as such you can't set the value of current section to a variable. However I suppose there is a small mistake and that bang should have to be a !SetOption. But in this case there are too less parameters, at least one more is required.
Not sure about your intention.
The Meters are named [1] [2] [3] [4] [5]

Thus using #CURRENTSECTION# in the style allows me to use section names as a variable, which prevents me from needing to use a MouseOverAction/etc. on each individual meter.

For example, on MouseOverAction, in style, I can use [!SetVariable MouseOverMeter #CURRENTSECTION#]. Now the variable will correlate to which meter I am currently active with. I can then use [!SetOption #MoveOverMeter# SolidColor "0,255,0"][!UpdateMeter #MouseOverMeter#][!Redraw] to set the color for whatever meter that happens to be.

I suppose you could also do this with just ordinary meter names, too, but using numbers makes the trick 10x more useful for a lot of applications.
Last edited by Cariboudjan on January 6th, 2020, 9:42 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Interrupt a !bang?

Post by balala »

Cariboudjan wrote: January 6th, 2020, 9:33 pm The Meters are named [1] [2] [3] [4] [5]

Thus using #CURRENTSECTION# in the style allows me to use section names as a variable, which prevents me from needing to use a MouseOverAction/etc. on each individual meter.
Yes, you're right, this time I made a (huge) mistake. Please forgive me. Before I wrote my reply, I worked with a similar problem on a completely different context, this misled me. :?
I modified my previous reply, just to make sure it doesn't misled others.
Sorry again...