It is currently April 27th, 2024, 8:32 am

[Suggestion] Change switch behaviour of Hidden=1

Report bugs with the Rainmeter application and suggest features.
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

[Suggestion] Change switch behaviour of Hidden=1

Post by Virginityrocks »

Whether hidden is set to 1 or -1, both result in a hidden meter. This is not very good. I would like for any value above 0 to be hidden, any value below to be shown.
(Right now any number other than 0 hides the meter)

Here's why I want this. I wanted certain meters to only show themselves if a certain variable reached a certain value... example:

###################

items=3

[meter1]
hidden=(1-#items#)

[meter2]
hidden=(2-#items#)

[meter3]
hidden=(3-#items#)

[meter4]
hidden=(4-#items#)

[meter5]
hidden=(5-#items#)

#####################

"Hidden" in meters 1 through 3 equal -2, -1, and 0 respectively. Each of these show. Meters 4 and 5 equal 1 and 2 respectively. Each of these hide. As the value of #items# changes, so too does the number of meters in order.

If you know of any way to achieve this right now without using a convoluted mess of calcs and if statements to show/hide meters individually, please let me know. Because I'm stumped.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: [Suggestion] Change switch behaviour of Hidden=1

Post by poiru »

You could use:
hidden=(4-#items# <= 0 ? 0 : 1)
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: [Suggestion] Change switch behaviour of Hidden=1

Post by Virginityrocks »

Interesting. I'll try that now.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: [Suggestion] Change switch behaviour of Hidden=1

Post by Virginityrocks »

Well, that works. Probably works better this way, too. I didn't know you could use a condition outside of a formula. I learned something today.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Change switch behaviour of Hidden=1

Post by jsmorley »

Virginityrocks wrote:Well, that works. Probably works better this way, too. I didn't know you could use a condition outside of a formula. I learned something today.
Another way to look at it is that you can use a formula on almost any numeric setting, not just in a Calc measure.
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: [Suggestion] Change switch behaviour of Hidden=1

Post by Virginityrocks »

Interesting. That opens the program up a lot more.

I have a gripe, though. It seems that the hidden=(4-#items# <= 0 ? 0 : 1) doesn't work on version 2.2 of Rainmeter, only in the 2.3 beta. I tried on both on 2 different computers.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
User avatar
Brian
Developer
Posts: 2686
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Suggestion] Change switch behaviour of Hidden=1

Post by Brian »

This is a new feature for 2.3 and not 2.2 (because 2.2 has already been released).

-Brian
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: [Suggestion] Change switch behaviour of Hidden=1

Post by Virginityrocks »

Alright. Fair enough.
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter