It is currently September 8th, 2024, 12:13 am

Nested Conditions + Formulas

Get help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

So DynamicVariables is needed for Measure Variables only? Or any Variable that changes?
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

No worries, I got it! :)
57686174 77696C6C 6265 77696C6C 6265
User avatar
Yincognito
Rainmeter Sage
Posts: 8030
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Nested Conditions + Formulas

Post by Yincognito »

sl23 wrote: July 21st, 2024, 9:41 pm So DynamicVariables is needed for Measure Variables only? Or any Variable that changes?
sl23 wrote: July 21st, 2024, 9:56 pm No worries, I got it! :)
The 2nd part, mostly, as you could see. Additional reference:
https://docs.rainmeter.net/tips/dynamiccheatsheet/
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

:thumbup:
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

57686174 77696C6C 6265 77696C6C 6265
User avatar
balala
Rainmeter Sage
Posts: 16499
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nested Conditions + Formulas

Post by balala »

sl23 wrote: July 21st, 2024, 9:40 pm IT WORKED!!!! :D :D :D
That's solved a lot of problems! :thumbup:
:thumbup:
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

Sorry, getting stuck on these formulas again.Would someone be able to check if I've got these right please.
Not sure what other info is required, but let me know if there's anything else. :thumbup:

Code: Select all

[Variables]
; Adjust Bar size to suit:
BarW=14
BarH=45
; Specify Speed in MB/s:
DownSpeed=30.00
UpSpeed=10.00
; Specify BinSize in GB:
BinSize=50

[sBar2]
DynamicVariables=1
Shape=Rectangle 0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), -#BarH# | StrokeWidth 0 | Fill Color #Bg#
Group=BarBg
X=([#[#CURRENTSECTION]]=1 ? 0 : 2)R
Y=#BarH#

; SHAPE = Bg
; SHAPE2=Bar
; SHAPE3=Line

[1Stat] ; CPU
Meter=Shape
MeterStyle=sBar2
Shape2=Rectangle     0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), ([&m[#CURRENTSECTION]:]/100*(-#BarH#)) | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]],#BarAlphe#
Shape3=Rectangle 0, ([&m[#CURRENTSECTION]:]/100*(-#BarH#)), ([#[#CURRENTSECTION]]=1?0:#BarW#), 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]
X=0

[2Stat] ; GPU - intel
Meter=Shape
MeterStyle=sBar2
Shape2=Rectangle     0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), ([&m[#CURRENTSECTION]:]/100*(-#BarH#)) | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]],#BarAlphe#
Shape3=Rectangle 0, ([&m[#CURRENTSECTION]:]/100*(-#BarH#)), ([#[#CURRENTSECTION]]=1?0:#BarW#), 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]

[3Stat] ; RAM
Meter=Shape
MeterStyle=sBar2
Shape2=Rectangle 0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), (([m#CURRENTSECTION#:]/[m#CURRENTSECTION#Total:])*(-#BarH#)) | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]],#BarAlphe#
Shape3=Rectangle 0, (([m#CURRENTSECTION#:]/[m#CURRENTSECTION#Total:])*(-#BarH#)), ([#[#CURRENTSECTION]]=1?0:#BarW#), 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]

[4Stat] ; NET download
Meter=Shape
MeterStyle=sBar2
Shape2=Rectangle     0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), (([&m[#CURRENTSECTION]:%]/#DownSpeed#)*(-#BarH#)) | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]],#BarAlphe#
Shape3=Rectangle 0, (([&m[#CURRENTSECTION]:%]/#DownSpeed#)*(-#BarH#)), ([#[#CURRENTSECTION]]=1?0:#BarW#), 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]

[5Stat] ; NET upload
Meter=Shape
MeterStyle=sBar2
Shape2=Rectangle     0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), (([&m[#CURRENTSECTION]:%]/#UPSpeed#)*(-#BarH#)) | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]],#BarAlphe#
Shape3=Rectangle 0, (([&m[#CURRENTSECTION]:%]/#UPSpeed#)*(-#BarH#)), ([#[#CURRENTSECTION]]=1?0:#BarW#), 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]

[6Stat] ; Recycle Bin
Meter=Shape
MeterStyle=sBar2
Shape2=Rectangle     0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), (([&m[#CURRENTSECTION]:%]/mBinsize)*(-#BarH#)) | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]],#BarAlphe#
Shape3=Rectangle 0, (([&m[#CURRENTSECTION]:%]/mBinsize)*(-#BarH#)), ([#[#CURRENTSECTION]]=1?0:#BarW#), 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]
ToolTipTitle=Bin: [mBinCount] item#ItemPostfix# - [mScaledSize] #ScaleFactor#
The only things I'm having issues with, is the percentage values of each. I'm unsure if they are correct.
Also, the 'Line' part of each meter seems to go lower and higher than the 'Bar' part, I can't figure out why that is. Everything seems to work except the RecycleBin meter, [6Stat], which won't work at all. It gives this error:
Formula: "[mBinsize]" is unknown: ((22.9340626802/[mBinsize])*(-45))

Thanks for your help.
Last edited by sl23 on July 23rd, 2024, 9:44 pm, edited 2 times in total.
57686174 77696C6C 6265 77696C6C 6265
User avatar
KazukiGames82
Posts: 31
Joined: January 25th, 2023, 2:56 am

Re: Nested Conditions + Formulas

Post by KazukiGames82 »

sl23 wrote: July 23rd, 2024, 9:32 pm Also, the 'Line' part of each meter seems to go lower and higher than the 'Bar' part, I can't figure out why that is. Everything seems to work except the RecycleBin meter, [6Stat], which won't work at all.

Thanks for your help.
Shape2=Rectangle 0, 0, ([#[#CURRENTSECTION]]=1?0:#BarW#), (([&m[#CURRENTSECTION]:%]/mBinsize)*(-#BarH#))

Rainmeter translate that mBinsize as a string so it goes into a logical error, if it's a measure then use the [mBinsize]
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

Aha, yes thank you! :thumbup:
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

Didn't solve the problem unfortunately. Anything else you can see that's wrong? Should I post the full code?
57686174 77696C6C 6265 77696C6C 6265