It is currently April 26th, 2024, 11:38 am

Can I specify a meter to 'Click Through'?

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can I specify a meter to 'Click Through'?

Post by balala »

sl23 wrote: February 14th, 2023, 7:30 am Haven't had time to look at this yet, but just thought I'd point out that the ctrl + right click seems to be an issue. Not sure if it's my system, Rainmeter or the fact the shape covers the desktop.

But it takes several clicks to bring up the context menu. Sometimes up to ten clicks before it appears! Is it a bug?
I also encountered this issue in past, but was no so hard dealing with it. This means that in many cases the first Ctrl + Right click works, but if it doesn't, the second one definitely works. Never had to click ten times and in fact never had to click more than twice. This is definitely not a Rainmeter bug, something else is going on there.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Can I specify a meter to 'Click Through'?

Post by sl23 »

Thanks for the response.

The code I have already posted on page 1. When I ctrl + R-click, I more often then not get the desktop context menu instead of the Rainmeter one.

When I get time ill try making a short video of the problem.
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can I specify a meter to 'Click Through'?

Post by balala »

sl23 wrote: February 15th, 2023, 7:31 am The code I have already posted on page 1. When I ctrl + R-click, I more often then not get the desktop context menu instead of the Rainmeter one.
The skin based on the posted code has nothing which could require a Ctrl - Right click. Simple Right click perfectly works. Is there a setting of the skin which requires Ctrl - Right click?
sl23 wrote: February 15th, 2023, 7:31 am When I get time ill try making a short video of the problem.
Please do so and post it here.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Can I specify a meter to 'Click Through'?

Post by sl23 »

That's because this whole thing revolves around setting the skin to click through! Hence the title ;)
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can I specify a meter to 'Click Through'?

Post by balala »

sl23 wrote: February 15th, 2023, 10:06 pm That's because this whole thing revolves around setting the skin to click through! Hence the title ;)
Yep, right. Now I realized I lost the essence. :? Sorry, my bad...
So, waiting for the video...
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Can I specify a meter to 'Click Through'?

Post by sl23 »

Two things...

1. The Ctrl + R-click seems to be working better now, only requiring one or two clicks to show context menu. Perhaps it was a windows issue. Or maybe, as I've always had this issue no matter the OS (Win11 22H2), my PC hasn't been restarted for months due to working on VST presets. I've only shutdown maybe once or twice in the last 6 months. In the past, this always caused OS instability, though seems less so nowadays, it is still an issue.

2. I can't believe I never noticed that you can just hold CTRL and hover the buttons! :? :? :? Problem solved lol Thanks for everyone's help :thumbup:
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can I specify a meter to 'Click Through'?

Post by balala »

sl23 wrote: February 18th, 2023, 9:51 am 1. The Ctrl + R-click seems to be working better now, only requiring one or two clicks to show context menu. Perhaps it was a windows issue. Or maybe, as I've always had this issue no matter the OS (Win11 22H2), my PC hasn't been restarted for months due to working on VST presets.
As said, two Ctrl + Right-clicks are required for me as well from time to time, same way as you, don't always get the menu on first click. But not more. This is not a Windows issue, in my opinion. But am not sure...
sl23 wrote: February 18th, 2023, 9:51 am I've only shutdown maybe once or twice in the last 6 months. In the past, this always caused OS instability, though seems less so nowadays, it is still an issue.
On Windows 8 and later, shutting down and booting up the computer, doesn't restarts it in fact. Just a Restart does this.
sl23 wrote: February 18th, 2023, 9:51 am 2. I can't believe I never noticed that you can just hold CTRL and hover the buttons! :? :? :? Problem solved lol Thanks for everyone's help :thumbup:
What the holding down the Ctrl does, if you're hovering the mouse over buttons? And what kind of buttons are you talking about? Some buttons realized on skins? Not sure I follow this...
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Can I specify a meter to 'Click Through'?

Post by sl23 »

Ok, so I have a Shape covering the working area:
Shape=Rectangle 0,0,#ScreenAreaWidth#,#WorkAreaHeight#,0 | Extend FillAlpha

Then I have buttons to change the colour of the background, or at least that's the idea I'm trying to realise:

Code: Select all

[sButton]
Shape=Ellipse 0,0,10 | FillColor #BgFill# | StrokeWidth 2 | Extend StrokeAlpha
StrokeAlpha=StrokeColor #White60#

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #Yellow#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #White60#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
X=r
Y=30r

[Button1]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!WriteKeyValue Variables ScreenSaver 0,0,0,210][!SetOption Background FillAlpha "FillColor 0,0,0,210"][!UpdateMeter Background][!Redraw]

MouseScrollUpAction=[!SetVariable Alpha (#Alpha#+10)][!UpdateMeter Background][!Redraw]
MouseScrollDownAction=[!SetVariable Alpha (#Alpha#-10)][!UpdateMeter Background][!Redraw]
X=50
Y=100

[Button2]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!WriteKeyValue Variables ScreenSaver 0,0,0,150][!SetOption Background FillAlpha "FillColor 0,0,0,150"][!UpdateMeter *][!Redraw]

[Button3]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!WriteKeyValue Variables ScreenSaver 50,10,0,210][!SetOption Background FillAlpha "FillColor 50,10,0,210"][!UpdateMeter *][!Redraw]
I call them Buttons, as they are clickable Shape Meters.

If you notice in the section called [Button1], I am trying to figure out how to use MouseScrollActions to adjust the Alpha Variable, but I can't figure it out. Not sure where to look in the Manual, apart from the obvious, which I have checked. ;)

Ideally, I'm looking to have several buttons for some default colour settings, and then have buttons for R G B A, with scrollable adjustment. So, if I hover on the R button, I can adjust the value of the Red colour setting for the Background ScreenSaver Shape Meter.

Here's the full code:

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=ScreenSaver
Author=sl23
Information=Screen saver background and night filter.||
Version=2023.2.11
License=CC BY 3.0

[Variables]
Alpha=210
ScreenSaver=0,0,0,#Alpha#
BgFill=0,0,0,150
White20=255,255,255,20
White60=255,255,255,60
Yellow=255,255,0

==================================
[Background]
Meter=Shape
Shape=Rectangle 0,0,#ScreenAreaWidth#,#WorkAreaHeight#,0 | Extend FillAlpha
FillAlpha=FillColor #ScreenSaver#
DynamicVariables=1

==================================
[sButton]
Shape=Ellipse 0,0,10 | FillColor #BgFill# | StrokeWidth 2 | Extend StrokeAlpha
StrokeAlpha=StrokeColor #White60#

MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #Yellow#"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor #White60#"][!UpdateMeter *][!Redraw]

DynamicVariables=1
X=r
Y=30r

[Button1]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!WriteKeyValue Variables ScreenSaver 0,0,0,210][!SetOption Background FillAlpha "FillColor 0,0,0,210"][!UpdateMeter Background][!Redraw]

MouseScrollUpAction=[!SetVariable Alpha (#Alpha#+10)][!UpdateMeter Background][!Redraw]
MouseScrollDownAction=[!SetVariable Alpha (#Alpha#-10)][!UpdateMeter Background][!Redraw]
X=50
Y=100

[Button2]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!WriteKeyValue Variables ScreenSaver 0,0,0,150][!SetOption Background FillAlpha "FillColor 0,0,0,150"][!UpdateMeter *][!Redraw]

[Button3]
Meter=Shape
MeterStyle=sButton
LeftMouseUpAction=[!WriteKeyValue Variables ScreenSaver 50,10,0,210][!SetOption Background FillAlpha "FillColor 50,10,0,210"][!UpdateMeter *][!Redraw]
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Can I specify a meter to 'Click Through'?

Post by balala »

sl23 wrote: February 18th, 2023, 12:37 pm If you notice in the section called [Button1], I am trying to figure out how to use MouseScrollActions to adjust the Alpha Variable, but I can't figure it out. Not sure where to look in the Manual, apart from the obvious, which I have checked. ;)

Ideally, I'm looking to have several buttons for some default colour settings, and then have buttons for R G B A, with scrollable adjustment. So, if I hover on the R button, I can adjust the value of the Red colour setting for the Background ScreenSaver Shape Meter.
Add bangs to set the value of the ScreenSaver variables as well, besides setting the value of Alpha variable, in the MouseScrollUpAction and MouseScrollDownAction options of the [Button1] meter. Even if it works with the "classic" approach as well, recommend to add the Alpha variable as a Nesting variable. Something like this:

Code: Select all

[Button1]
...
MouseScrollUpAction=[!SetVariable Alpha (#Alpha#+10)][!SetVariable ScreenSaver "0,0,0,[#Alpha]"][!UpdateMeter "Button1"][!UpdateMeter Background][!Redraw]
MouseScrollDownAction=[!SetVariable Alpha (#Alpha#-10)][!SetVariable ScreenSaver "0,0,0,[#Alpha]"][!UpdateMeter "Button1"][!UpdateMeter Background][!Redraw]
...
Note that besides adding the new !SetVariable bangs, I added some [!UpdateMeter "Button1"] bangs as well, because when scrolling (especially when trying to fast-scroll), the value of the Alpha variable has to be updated into the MouseScrollUpAction and MouseScrollDownAction options of the meter as well, to get the change immediately.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Can I specify a meter to 'Click Through'?

Post by sl23 »

That's excellent, thank you balala! :thumbup:

Although it works on first use, once you click on another button, the scrolling stops working, any idea why that is?
- MuLab -