This package has five .ini skin files. Which one have we to work with?
It is currently April 20th, 2024, 2:59 am
Volume Change and ToggleMute Substitute="-1":"0"
-
- Rainmeter Sage
- Posts: 16147
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Volume Change and ToggleMute Substitute="-1":"0"
-
- Rainmeter Sage
- Posts: 16147
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Volume Change and ToggleMute Substitute="-1":"0"
Instead of making a substitution on the [Percent] measure, I'd use a Clamp function to limit the returned value:
Code: Select all
[Percent]
Measure=Calc
Formula=( Clamp ( MeasureVolume, 0, 100 ))
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Volume Change and ToggleMute Substitute="-1":"0"
Yeah, it looks like I have to check your skins, after all, because my posted example works 100% so it must be something in your skins that's preventing the expected result... Will take a look at them in a moment.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Volume Change and ToggleMute Substitute="-1":"0"
His first posted code is from Round iTunes, the subsequent code is from Small Vol, and here lies the problem, see my following reply.
Last edited by Yincognito on August 5th, 2020, 10:11 am, edited 2 times in total.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Volume Change and ToggleMute Substitute="-1":"0"
Yeah, figured out what the problem is. You need to set Text=[Percent]% in your [PercentString] meter from the Round iTunes\music_big.ini skin and the 0 will appear. The reasson is simple: when you set it to Text=[Percent:0]%, the meter displays the number value of that measure, which I already told you it can't be directly modified; on the other hand, when set to Text=[Percent]%, the meter displays the string value of that measure, which is properly substituted with "0".
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
Re: Volume Change and ToggleMute Substitute="-1":"0"
Such a simple solution!Yincognito wrote: ↑August 5th, 2020, 10:06 am Yeah, figured out what the problem is. You need to set Text=[Percent]% in your [PercentString] meter from the Round iTunes\music_big.ini skin and the 0 will appear. The reasson is simple: when you set it to Text=[Percent:0]%, the meter displays the number value of that measure, which I already told you it can't be directly modified; on the other hand, when set to Text=[Percent]%, the meter displays the string value of that measure, which is properly substituted with "0".
I've been trying to break the skin to identify any error in code flow. But this was unexpected. I looked at it and looked at it but the zero seemed so 'necessary'. I now know that was not the case.
It is almost release time for version 2 of this mini suite.
Thanks Yincognito (once again).
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Volume Change and ToggleMute Substitute="-1":"0"
No worries - glad to help. As you can see, it sometimes pays off to be aware of the little details in the manual...Mor3bane wrote: ↑August 5th, 2020, 10:12 am Such a simple solution!
I've been trying to break the skin to identify any error in code flow. But this was unexpected. I looked at it and looked at it but the zero seemed so 'necessary'. I now know that was not the case.
It is almost release time for version 2 of this mini suite.
Thanks Yincognito (once again).
-
- Rainmeter Sage
- Posts: 16147
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Volume Change and ToggleMute Substitute="-1":"0"
The disadvantage of this approach is that it requires to set the dynamic variables. If you put a MeasureName=Percent and you use a simple Text=%1% option on the same string meter, you can avoid setting the dynamic variables.Yincognito wrote: ↑August 5th, 2020, 10:06 am You need to set Text=[Percent]% in your [PercentString] meter from the Round iTunes\music_big.ini skin and the 0 will appear.
-
- Rainmeter Sage
- Posts: 7128
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Volume Change and ToggleMute Substitute="-1":"0"
Well, I only corrected the existing code to solve the issue that was referenced to. As for the rest, you're right of course, there's no need to have section variables there in theory, but then, I have no idea what other reasons are there to justify its presence...
-
- Posts: 943
- Joined: May 7th, 2016, 7:32 am
Re: Volume Change and ToggleMute Substitute="-1":"0"
Thanks, I changed to your recommedation.
No apparent issues, so all is good afaik.Yincognito wrote: ↑August 5th, 2020, 12:30 pm Well, I only corrected the existing code to solve the issue that was referenced to. As for the rest, you're right of course, there's no need to have section variables there in theory, but then, I have no idea what other reasons are there to justify its presence...
My DevArt Gallery
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
There are many ways to be different - there is only one way to be yourself - be amazing at it
The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.