It is currently April 20th, 2024, 6:22 am

How to use relative position within a ternary check (in order to design a grid with customizable column count)

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

Re: How to use relative position within a ternary check (in order to design a grid with customizable column count)

Post by balala »

MetalTxus wrote:The idea was for it to be absolute when n % #colCount# = 0 but relative otherwise.
As jsmorley explained, this is not possible.
But in his last two replies he advised you to use the section variables. Probably this could help.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to use relative position within a ternary check (in order to design a grid with customizable column count)

Post by jsmorley »

Code: Select all

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

[MeterOne]
Meter=String
X=0
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=One

[MeterTwo]
Meter=String
X=(10+5)R
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Two

[MeterThree]
Meter=String
X=([MeterTwo:X]+[MeterTwo:W]+15)
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=Three
MeterTwo and MeterThree are identical in how they are positioned.

X=([MeterName:X]+[MeterName:W]+10) is the same thing as X=10R
X=([MeterName:X]+10) is the same thing as X=10r

The difference being that you must "name" the meters to be relative to, and can't just let it figure out the "immediately previous" meter.
User avatar
MetalTxus
Posts: 46
Joined: October 19th, 2016, 9:03 pm
Location: Spain

Re: How to use relative position within a ternary check (in order to design a grid with customizable column count)

Post by MetalTxus »

OK, I've managed to get it working. I've tested it with different column counts and no issue arose, so I'll close the ticket.
As always, thanks to everyone for everything :)
Image
• GitHub | • DeviantArt
OS: W10 x64 / GPU: GTX 1050 Ti / CPU: i3-4160 / RAM: 8GB
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to use relative position within a ternary check (in order to design a grid with customizable column count)

Post by jsmorley »

MetalTxus wrote:OK, I've managed to get it working. I've tested it with different column counts and no issue arose, so I'll close the ticket.
As always, thanks to everyone for everything :)
You will receive a short customer service questionnaire in an email shortly.