It is currently March 29th, 2024, 11:30 am

New Shape Meter

Changes made during the Rainmeter 4.0 beta cycle.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

Youkai1977 wrote: January 29th, 2021, 7:02 pmThis is really really really time-consuming. A small mistake and the result can be fatal if several individual skins are dependent on the same [Variables] section.
[...]
What is still difficult for me is to write my skins in such a way that they can be used by the Rainmeter community without major restrictions or adjustments if I intend to share my creations.
[...]
I haven't succeeded in doing so yet. Therefore, I always first concentrate on making sure that it fits my PC.
[...]
And already we have a major scaling problem. Two screens with such different resolutions. Even the most impossible coordinate information comes around in Rainmeter when you slide the individual meters / skins or even the entire suite onto the secondary screen.
Sure, one first does a skin for himself and only then for others, but it helps if the skin developer starts with making the skins scalable in the first place, instead of having to rewrite/adjust skins that already use hardcoded values. Much easier that way, correcting things on an already written code is going to be more difficult indeed. If the basis is already set to be adjustable, everything else goes smoothly and easily afterwards. That goes not just for scaling, but for the variables thing that you mentioned as well. Personally, I started my suite with the idea of making it scalable/adjustable and did not have to correct or modify things afterwards - it was a great idea, as not only adjusting things becomes easier, but also replicating or creating "clone" skins that you can reuse for a different purpose is easier too.
Youkai1977 wrote: January 29th, 2021, 7:02 pmThis is the simplest and yet best optimization that my visualizer could experience :thumbup:
I'm glad it worked up for you and it helped alleviate the CPU usage issue. ;-) The rest of the "CPU hogs" bits can be, if not fixed, at least identified by selectively commenting/uncommenting parts of the skin (CTRL+Q on the selected text in Notepad++ with RainLexer) and see which parts use the CPU most. I suppose the 8% to 12% CPU usage is for your entire suite, because for me, your visualizer alone doesn't consume that much (it takes around 3.5% CPU on average over 1 minute on my 2.3 GHz CPU, if I recall correctly). As with everything, there are multiple factors affecting the CPU usage of a visualizer (some internal, some external), like explained here.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New Shape Meter

Post by balala »

Youkai1977 wrote: January 29th, 2021, 7:06 pm Well, regarding errors in (my) skins / meters, I better keep myself closed. I'm pretty good at this too. :Whistle :oops:
Why? Whenever you do have problems with a skin, code or with Rainmeter itself, don't keep it for yourself. Come out here, there might be someone to help you with it.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: New Shape Meter

Post by Youkai1977 »

Sure, one first does a skin for himself and only then for others, but it helps if the skin developer starts with making the skins scalable in the first place, instead of having to rewrite/adjust skins that already use hardcoded values. Much easier that way, correcting things on an already written code is going to be more difficult indeed. If the basis is already set to be adjustable, everything else goes smoothly and easily afterwards. That goes not just for scaling, but for the variables thing that you mentioned as well. Personally, I started my suite with the idea of making it scalable/adjustable and did not have to correct or modify things afterwards - it was a great idea, as not only adjusting things becomes easier, but also replicating or creating "clone" skins that you can reuse for a different purpose is easier too.
To be honest, I've never really looked at the scaling of skins. I have already come across codes that probably have something to do with it ... #WORKAREAWIDTH# ... will probably be something like that. But I'll keep my hands off such things for now. I'm glad that I just understand the SHAPE topic.
'm glad it worked up for you and it helped alleviate the CPU usage issue. ;-) The rest of the "CPU hogs" bits can be, if not fixed, at least identified by selectively commenting/uncommenting parts of the skin (CTRL+Q on the selected text in Notepad++ with RainLexer) and see which parts use the CPU most. I suppose the 8% to 12% CPU usage is for your entire suite, because for me, your visualizer alone doesn't consume that much (it takes around 3.5% CPU on average over 1 minute on my 2.3 GHz CPU, if I recall correctly). As with everything, there are multiple factors affecting the CPU usage of a visualizer (some internal, some external), like explained here.
Right, overall my skin consists of:
- 1 Clock with date & alarm function
- 6 Slider launchers
- 1 Weather
- 1 CPU Monitor (only with Rainmeter funktions & without 3th party Programs) Because an AMD doesn't get hot :sly: 8-) I don't need any temps
- 1 RAM Monitor with TOP10 consumers
- 1 Network (with monitoring whether the line is up)
- 1 Marquee NewsReader
- 1 Drive monitor
- 1 Visualizer
- 1 YT Player (WebNowPlaying control)
- 1 InfoMeter (system runtime, logged-in user, etc.)
- 1 Slide show (currently at 8sec intervals)
- 1 Recycle bin (animated when full, 2 Frames BitMap)
- 1 Background on screen size (1440x900) as a separate meter with built-in monitoring whether YouTube is open on the browser. If so, YT-Player & Visualizer will start

Well and our popular Win10, which doesn't load the CPU at all -.-
But thank goodness I'm not to blame for its (incorrect) programming. :rofl:

I've heard of this Notepad ++, but I'm not (yet) using it.
I have been writing everything in rancid Windows Notepad since the beginning.
But your tip sounds interesting. Maybe I'll take a look.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: New Shape Meter

Post by Youkai1977 »

balala wrote: January 29th, 2021, 8:47 pm Why? Whenever you do have problems with a skin, code or with Rainmeter itself, don't keep it for yourself. Come out here, there might be someone to help you with it.
Currently, as you can read here, as in other threads, I do.
But I'm currently having so much trouble converting my skin suite that I would only be here at the moment and would ask you for advice.
So, I'll try it myself first. And if nothing works for me, then I scream for help here in the forum. Promised :D :thumbup:
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: New Shape Meter

Post by balala »

Youkai1977 wrote: January 29th, 2021, 9:16 pm So, I'll try it myself first. And if nothing works for me, then I scream for help here in the forum. Promised :D :thumbup:
Yep, that's definitely the best practice.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: New Shape Meter

Post by Youkai1977 »

balala wrote: January 29th, 2021, 9:20 pm Yep, that's definitely the best practice.
I think so.
First try to learn yourself.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

Youkai1977 wrote: January 29th, 2021, 9:09 pmRight, overall my skin consists of:
- 1 Clock with date & alarm function
- 6 Slider launchers
- 1 Weather
- 1 CPU Monitor (only with Rainmeter funktions & without 3th party Programs) Because an AMD doesn't get hot :sly: 8-) I don't need any temps
- 1 RAM Monitor with TOP10 consumers
- 1 Network (with monitoring whether the line is up)
- 1 Marquee NewsReader
- 1 Drive monitor
- 1 Visualizer
- 1 YT Player (WebNowPlaying control)
- 1 InfoMeter (system runtime, logged-in user, etc.)
- 1 Slide show (currently at 8sec intervals)
- 1 Recycle bin (animated when full, 2 Frames BitMap)
- 1 Background on screen size (1440x900) as a separate meter with built-in monitoring whether YouTube is open on the browser. If so, YT-Player & Visualizer will start
Yep, it makes sense now. I guess 8%-12% is what you would call a moderate CPU usage for this setup. It could probably be lower, of course, but it's not exaggerately high either.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: New Shape Meter

Post by Youkai1977 »

Yincognito wrote: January 30th, 2021, 12:55 am Yep, it makes sense now. I guess 8%-12% is what you would call a moderate CPU usage for this setup. It could probably be lower, of course, but it's not exaggerately high either.
I also think that this for my current skin setup, plus the things that are still running in the background apart from Rainmeter, are quite ok for my old bowl. Especially under the premise that the current SKIN suite has not yet been completely rebuilt / optimized.

But back to the shape topic in this thread, and squinted to "balala" who said I should ask if there is a problem. :???: :oops:
And that's exactly what it does with my slider launcher for a shape meter.

Here my Code: (The skin is currently under renovation)

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Metadata]
Name=Direct Launcher (Quick Links)
Author=Youkai1977 
Version=2021 <> 26.01.
Information=This Meter is a Part of M.A.R.S.- 2021 Skin Package
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

;--------------------------------------------------
;--- VARIABLES & STYLES ---------------------------
;--------------------------------------------------

[Variables]
@include=launcherlinks_side.inc
Images=#@#images\
Offset=-200
SlideAmount=10
SL=22
Height=19
Width=170
SetVarWidth=190
FontFace=UBUNTU LIGHT
BigFont=600
SmallFont=300
FS4=14
FS5=12
Alpha1=170
Alpha3=230
Alpha5=30
Alpha6=65
Color1=0,78,195,
Color2=17,207,255,
Color3=164,164,164,
Color4=200,200,200,
Color5=68,118,255,
GColor_1=GradientColor | 90 | #Color1##Alpha3# ; 1.0 | #Color2##Alpha3# ; 0.5
SColor_1=Shadow | 0 | 0 | 2.5 | #Color5##Alpha1#
GColor_2=GradientColor | 270 | #Color3##Alpha3# ; 0.5 | #Color4##Alpha3# ; 1.0
SColor_2=Shadow | 0 | 0 | 2.5 | #Color3##Alpha1#

[Style1]
FontFace=#FontFace#
AntiAlias=1

[Style2]
FontWeight=#BigFont#

[Style3]
StringAlign=LEFT

[Style6]
InlineSetting=#GColor_1#
InlineSetting2=#SColor_1#
MouseOverAction=[!ShowMeter MenuPoint][!SetOption MenuPoint Y [#CURRENTSECTION#:Y]][!UpdateMeter MenuPoint][!SetOption #CURRENTSECTION#  InlineSetting "#GColor_2#"][!SetOption #CURRENTSECTION#  InlineSetting2 "#SColor_2#"][!SetOption #CURRENTSECTION# FontWeight "#BigFont#"][!SetVariable "Width" "#SetVarWidth#"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!HideMeter MenuPoint][!SetOption #CURRENTSECTION#  InlineSetting "#GColor_1#"][!SetOption #CURRENTSECTION#  InlineSetting2 "#SColor_1#"][!SetOption #CURRENTSECTION# FontWeight "#SmallFont#"][!SetVariable "Width" "#Width#"][!UpdateMeter #CURRENTSECTION#][!Redraw]

[Style7]
InlineSetting=#GColor_2#
InlineSetting2=#SColor_2#

;--------------------------------------------------
;--- MEASURES -------------------------------------
;--------------------------------------------------

[mSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Right,1,20
ActionList2=Repeat Left,1,20
Right=[!HideMeter Opener][!SetVariable Offset "(Clamp(#Offset#+#SlideAmount#,-200,0))"][!UpdateMeasure mSlider][!UpdateMeterGroup Sliders][!Redraw]
Left=[!SetVariable Offset "(Clamp(#Offset#-#SlideAmount#,-200,0))"][!UpdateMeasure mSlider][!UpdateMeterGroup Sliders][!Redraw]
IfCondition=#Offset# = -200
IfTrueAction=[!ShowMeter Opener][!SetOption Opener LeftMouseUpAction """[!CommandMeasure mSlider "Stop 2"][!CommandMeasure mSlider "Execute 1"]"""]
IfCondition2=#Offset# = 0
IfTrueAction2=[!SetOption Background MouseLeaveAction """[!CommandMeasure mSlider "Stop 1"][!CommandMeasure mSlider "Execute 2"]"""]
DynamicVariables=1

;--------------------------------------------------
;--- BACKGROUND / OPENER BTN & MENUE-POINT --------
;--------------------------------------------------

[Opener]
Meter=BUTTON
SolidColor=0,0,0,1
ButtonImage=#Images#opener_btn.png
AntiAlias=1
X=0
Y=146
UpdateDivider=-1

[Background]
Meter=IMAGE
SolidColor=0,0,0,1
ImageName=#Images#bg_direct_links.png
AntiAlias=1
W=200
H=510
X=(0 + #Offset#)
Y=0
DynamicVariables=1
Group=SLIDERS
X=(0 + #Offset#)
Y=0

[MenuPoint]
Meter=Shape
X=0
Y=0
Shape=Rectangle 0,4,18,0 | StrokeWidth 9 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient | StrokeEndCap Triangle | Offset 0,#CURRENTSECTION#
Shape2=Rectangle 2,0,2,506 | StrokeWidth 1 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient  
StrokeGradient=90 | #Color1##Alpha3# ; 0.0 | #Color5##Alpha3# ; 1.0
FillGradient=0,0,0,0,170,50 | #Color5##Alpha6# ; 0.0 | #Color1##Alpha5# ; 1.0
DynamicVariables=1
UpdateDivider=-1
Hidden=1

;--------------------------------------------------
;--- DIRECT LAUNCER -------------------------------
;--------------------------------------------------

;--- HEAD 1 ---------------------------------------

[Head_Name_1]
Meter=STRING
MeterStyle=Style1 | Style2 | Style3 | Style7
FontSize=#FS4#
Text=#Headname_1#
X=(8 + #Offset#)
Y=2
DynamicVariables=1
Group=SLIDERS

;--- ITEM 1 ---------------------------------------

[Item_1]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E01#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=(#SL#+6)r
ClipString=1
LeftMouseUpAction=["#P01#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 2 ---------------------------------------

[Item_2]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E02#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P02#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 3 ---------------------------------------

[Item_3]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E03#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P03#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 4 ---------------------------------------

[Item_4]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E04#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P04#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 5 ---------------------------------------

[Item_5]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E05#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P05#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 6 ---------------------------------------

[Item_6]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E06#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P06#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 7 ---------------------------------------

[Item_7]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E07#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P07#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 8 ---------------------------------------

[Item_8]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E08#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P08#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 9 ---------------------------------------

[Item_9]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E09#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P09#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 10 --------------------------------------

[Item_10]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E10#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P10#"]
DynamicVariables=1
Group=SLIDERS

;--------------------------------------------------
;--------------------------------------------------
;--------------------------------------------------

;--- HEAD 2 ---------------------------------------

[Head_Name_2]
Meter=STRING
MeterStyle=Style1 | Style2 | Style3 | Style7
FontSize=#FS4#
Text=#Headname_2#
X=(8 + #Offset#)
Y=29r
DynamicVariables=1
Group=SLIDERS

;--- ITEM 11 --------------------------------------

[Item_11]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E11#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=(#SL#+6)r
ClipString=1
LeftMouseUpAction=["#P11#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 12 --------------------------------------

[Item_12]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E12#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P12#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 13 --------------------------------------

[Item_13]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E13#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P13#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 14 --------------------------------------

[Item_14]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E14#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P14#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 15 --------------------------------------

[Item_15]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E15#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P15#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 16 --------------------------------------

[Item_16]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E16#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P16#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 17 --------------------------------------

[Item_17]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E17#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P17#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 18 --------------------------------------

[Item_18]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E18#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P18#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 19 --------------------------------------

[Item_19]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E19#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P19#"]
DynamicVariables=1
Group=SLIDERS

;--- ITEM 20 --------------------------------------

[Item_20]
Meter=STRING
MeterStyle=Style1 | Style3 | Style6
FontSize=#FS5#
Text=#E20#
H=#Height#
W=#Width#
X=(22 + #Offset#)
Y=#SL#r
ClipString=1
LeftMouseUpAction=["#P20#"]
DynamicVariables=1
Group=SLIDERS
My problem is this:

In the meter [MenuPoint] the Shape = Rectangle 0,4,18,0 | StrokeWidth 9 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient | StrokeEndCap Triangle | Offset 0, #CURRENTSECTION# should always move to the menu item where the mouse is is on it.
That works great too.
But the Shape2 = Rectangle 2,0,2,506 | StrokeWidth 1 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient should stay on its coordinates. It also moves with what it should NOT.
Of course that doesn't work.
Sure, I could do an extra meter for the 2nd shape and it would be done.
But then what I plan to do doesn't work out.
Namely Shape3 = Combine Shape | Union Shape2 which should still be installed.
Because if Shape2 has an extra meter, I can hardly do the latter command.

The main actors in my skin are currently: [Style6] & [MenuPoint]

I hope I have expressed myself clearly and you understand what I want to achieve in my skin.
Who can help me here?

PS: I have included the (still) necessary graphics, if they are needed when you are testing / correcting the skin

OK, at least I'm going to do eye care first. It's 2:35 in the morning and at the weekend it's family first. So answer from me could take time.
You do not have the required permissions to view the files attached to this post.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: New Shape Meter

Post by Yincognito »

Youkai1977 wrote: January 30th, 2021, 1:41 am My problem is this:

In the meter [MenuPoint] the Shape = Rectangle 0,4,18,0 | StrokeWidth 9 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient | StrokeEndCap Triangle | Offset 0, #CURRENTSECTION# should always move to the menu item where the mouse is is on it.
That works great too.
But the Shape2 = Rectangle 2,0,2,506 | StrokeWidth 1 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient should stay on its coordinates. It also moves with what it should NOT.
Of course that doesn't work.
Sure, I could do an extra meter for the 2nd shape and it would be done.
But then what I plan to do doesn't work out.
Namely Shape3 = Combine Shape | Union Shape2 which should still be installed.
Because if Shape2 has an extra meter, I can hardly do the latter command.

The main actors in my skin are currently: [Style6] & [MenuPoint]

I hope I have expressed myself clearly and you understand what I want to achieve in my skin.
Who can help me here?

PS: I have included the (still) necessary graphics, if they are needed when you are testing / correcting the skin

OK, at least I'm going to do eye care first. It's 2:35 in the morning and at the weekend it's family first. So answer from me could take time.
Well, almost. You did include the code, but didn't include the external entities, like include files, images, etc. Anyway, for me it doesn't really matter, because in the simulated basic example below, all works out well:

Code: Select all

[Variables]
Offset=0

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

---Meters---

[MenuPoint]
Meter=Shape
X=0
Y=0
Shape=Rectangle 1,1,100,100 | StrokeWidth 1 | Stroke Color 0,0,0,255 | Fill Color 255,0,0,255 | Offset 0,#Offset#
Shape2=Rectangle 1,1,20,20 | StrokeWidth 1 | Stroke Color 0,0,0,255 | Fill Color 0,0,255,255  
UpdateDivider=-1
MouseOverAction=[!SetVariable Offset 50][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetVariable Offset 0][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1
So the fact that for you it doesn't work has nothing to do with how shape meters behave. Now that we took this possibility out, try to replace #Offset# with #CURRENTSECTION# in the first Shape - nothing happens. The reason is clear: Offset 0,#CURRENTSECTION# becomes Offset 0,MenuPoint. There isn't any value associated with MenuPoint, so the thing is just defaulted to 0 and basically nothing happens.

Now I don't know all the ins and outs in your skin, but it looks to me that you'd want the value of [Item_Number:Y] there, where Number would be the number of the currently hovered item meter. This only works using #CURRENTSECTION# if the Shape is part of the [Item_Number] section - which is not, as far as I can see. Otherwise, you'd need to identify somehow the Item that is hovered by the mouse. The thing is, mouse variables only work for clicks or scrolls, and not for hovering. For that, there are various mouse plugins where you can use mouse variables in the case of hover as well.

I have no idea if I understood what your actual goal is, so if I didn't or I missed something, let us know.

EDIT: If I think about it, you don't even need mouse variables, you only need to set some Index variable to the index of the item that is hovered, on hovering that meter. Basically, a MouseOverAction=[!SetVariable SomeIndex TheIndexOfThisItem] in all the item meters, then use SomeIndex in the above Shape, like Offset 0,[Item_#SomeIndex#:Y] or even Offset 0,[&Item_[#SomeIndex]:Y] if nesting variables help here.

EDIT2: On an even better look at the code, it looks like Style6, which you use in all the item meters, has [!SetOption MenuPoint Y [#CURRENTSECTION#:Y]], so that's why both shapes move ... because the meter itself moves.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: New Shape Meter

Post by Youkai1977 »

EDIT2: On an even better look at the code, it looks like Style6, which you use in all the item meters, has [!SetOption MenuPoint Y [#CURRENTSECTION#:Y]], so that's why both shapes move ... because the meter itself moves.
So, just for a moment, as I said, I'm actually on the family weekend and Rainmeter would have to wait.
But with the effort you have made, I wanted to answer briefly, because you have tried very hard to find a solution to my problem.
But ... unfortunately a little past the goal. Because only in your EDIT2: (quoted here) you have roughly hit what doesn't work for me.
And that's what it was all about. The entire meter should not move, only the (first) SHAPE contained therein.
It should always jump to the position where the mouse is when it is on a link (MouseOverAction). Everything in [Style6] under MouseOverAction.

But well, even if you missed the target with your proposed solution or even partially missed it, your effort should not be in vain for me.

I found the solution this morning, totally tired and feeling like Garfield without coffee.

Look here:

Code: Select all

[Style6]
InlineSetting=#GColor_1#
InlineSetting2=#SColor_1#
MouseOverAction=[!ShowMeter MenuPoint][!SetVariable "ShapeYCor" "(9 + [#CURRENTSECTION#:Y])"][!UpdateMeter MenuPoint][!SetOption #CURRENTSECTION#  InlineSetting "#GColor_2#"][!SetOption #CURRENTSECTION#  InlineSetting2 "#SColor_2#"][!SetOption #CURRENTSECTION# FontWeight "#BigFont#"][!SetVariable "Width" "#SetVarWidth#"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!HideMeter MenuPoint][!SetOption #CURRENTSECTION#  InlineSetting "#GColor_1#"][!SetOption #CURRENTSECTION#  InlineSetting2 "#SColor_1#"][!SetOption #CURRENTSECTION# FontWeight "#SmallFont#"][!SetVariable "Width" "#Width#"][!UpdateMeter #CURRENTSECTION#][!Redraw]

[MenuPoint]
Meter=Shape
X=0
Y=0
Shape=Line 0,0,12,0 | StrokeWidth 7 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient | StrokeEndCap Triangle | Offset 2,#ShapeYCor#
Shape2=Rectangle 2,0,2,502 | StrokeWidth 1 | Stroke LinearGradient StrokeGradient | Fill RadialGradient FillGradient
;Shape3=Combine Shape | Union Shape2
StrokeGradient=90 | #Color1##Alpha3# ; 0.0 | #Color5##Alpha3# ; 1.0
FillGradient=0,0,0,0,170,50 | #Color5##Alpha6# ; 0.0 | #Color1##Alpha5# ; 1.0
DynamicVariables=1
UpdateDivider=-1
Hidden=1
[!SetVariable "ShapeYCor" "(9 + [#CURRENTSECTION#:Y])"] <-> That was the part that had to be corrected by giving commands to set a variable. Called here by me "ShapeYcor" (for Shape Y Coordinate).
The (9 + [#CURRENTSECTION#:Y]) contains a "9" is only because otherwise the shape would not have been completely centered on the horizontal axis of the text. So for me a visual flaw which I could eliminate with the "9". :sly:

I don't know whether this is an optimal / correct or perfect solution, but at least one that works for me for the time being, and so I can now concentrate again on converting my slider-launcher.

If you or someone else has a better / cleaner solution, of course, I'll be all ears. :-)

The only thing that doesn't quite work now, and that's why I deactivated it again in the Meter [MenuPoint], is "Shape3", which is why I put all the effort into it. It works for the command, but unfortunately the graphic result is not what I wanted. But well ... I'll keep testing ... next week

PS .: I followed your tip with Notepad ++ and the RainLexer.
What can I say?! It takes a little getting used to for me. But I already wonder how I could ever work without Notepad ++
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl: