It is currently September 21st, 2023, 8:08 am
can we change measured value in string meter
-
- Posts: 33
- Joined: May 4th, 2010, 4:38 pm
can we change measured value in string meter
yep:) is there a way to change a measure value,for example measureminutes value by adding or subtracting 1 from it.I mean i want to display a range of numbers +-2 minutes without manipulating it with a calc measure? only one measure and multiple string meters that displays them
-
- Rainmeter Sage
- Posts: 642
- Joined: July 19th, 2009, 5:59 am
- Location: Montreal, QC, Canada
Re: can we change measured value in string meter
No, you have to use a Calc measure to manipulate measures. Why do you want to do it without one?
-
- Posts: 33
- Joined: May 4th, 2010, 4:38 pm
Re: can we change measured value in string meter
http://freakquency85.deviantart.com/#/d2r3qpn
I am trying to implement that clock on the link without using pngs for hours and minutes.i did it with calc measures in seconds section of clock to give a fading effect.But i think implementing the whole clock with code will be easy without using calc measures between the minute measure and string meters:)
By the way such a design will be cpu greedy or not, in your opinion? i wanted to ask as a guru answering it:)
I am trying to implement that clock on the link without using pngs for hours and minutes.i did it with calc measures in seconds section of clock to give a fading effect.But i think implementing the whole clock with code will be easy without using calc measures between the minute measure and string meters:)
By the way such a design will be cpu greedy or not, in your opinion? i wanted to ask as a guru answering it:)
-
- Rainmeter Sage
- Posts: 642
- Joined: July 19th, 2009, 5:59 am
- Location: Montreal, QC, Canada
Re: can we change measured value in string meter
I'd like to see what you did to get the seconds working. I'll see if maybe you aren't taking the long way around. Either way, regardless of how many Calcs and whatnot that you have, usually a skin won't jump up in CPU usage unless you tack on a high update rate, but for a clock once per second should be fine.
-
- Posts: 33
- Joined: May 4th, 2010, 4:38 pm
Re: can we change measured value in string meter
Code: Select all
[second-1measure]
Measure=Calc
Formula=(secondmeasure)%60
Substitude="-1":"59"
[second-2measure]
Measure=Calc
Formula=(secondmeasure - 1)%60
Substitude="-1":"59","-2":"58"
[second+1measure]
Measure=Calc
Formula=(secondmeasure + 2)%60
[second+2measure]
Measure=Calc
Formula=(secondmeasure + 3)%60
[secondmeter-2]
Meter=String
Measurename=second-2measure
FontFace=Century Gothic
FontColor=0,0,0,75
FontSize=16
X=327
Y=148
Text=" %1"
StringAlign=Center
AntiAlias=1
[secondmeter-1]
Meter=String
Measurename=second-1measure
FontFace=Century Gothic
FontColor=221f1f
FontSize=16
X=327
Y=165
Text=" %1"
StringAlign=Center
AntiAlias=1
[secondmeter]
Meter=String
Measurename=secondmeasure
FontFace=Century Gothic
FontColor=dedddd
FontSize=16
X=327
Y=182
Text=" %1"
StringAlign=center
StringStyle=normal
AntiAlias=1
StringAlign=Center
[secondmeter+1]
Meter=String
Measurename=second+1measure
FontFace=Century Gothic
FontColor=221f1f
FontSize=16
X=327
Y=+17r
Text=" %1"
StringAlign=Center
StringStyle=normal
AntiAlias=1
[secondmeter+2]
Meter=String
Measurename=second+2measure
FontFace=Century Gothic
FontColor=0,0,0,75
FontSize=16
X=327
Y=17r
Text=" %1"
StringAlign=Center
StringStyle=normal
AntiAlias=1
i did it like that and in addition the string meter for each of them with different color scheme to give the fading effect.But there is a problem while adding a value to a double digit value like "01" , "02" etc it is converted to a single digit value "1","2" while it is manipulated in calc measures.
I tried to add a substitute value but it affects also the values like "10" by making it "010"Is there a way to accomplish this?
-
- Rainmeter Sage
- Posts: 642
- Joined: July 19th, 2009, 5:59 am
- Location: Montreal, QC, Canada
Re: can we change measured value in string meter
Alright... Now that I look at it, that's really the only way to do it. You're going to need a Calc and a meter for each number you want to show. It's going to be tedious, but it'll work.
To force it to use two digits, I usually use a conditional statement to check if the value is less than 10, and if so, I tack on a number at the start of it that gets substituted into a zero. Here's your code with that working:You'll notice that [second-2measure] also makes sure that it's above zero, since -1 is a possible value. Also, you'll notice that I took out the substitutions for "-1":"59" in [second-1measure] and "-2":"58" in [second-2measure]. That is because the way you have it, those measures will never actually reach those values.
Keep up what you're doing and the skin should come together in no time.
To force it to use two digits, I usually use a conditional statement to check if the value is less than 10, and if so, I tack on a number at the start of it that gets substituted into a zero. Here's your code with that working:
Code: Select all
[second-1measure]
Measure=Calc
Formula=((secondmeasure)%60) < 10 ? (secondmeasure%60)+9990 : (secondmeasure%60)
Substitute="999":"0"
[second-2measure]
Measure=Calc
Formula=(((secondmeasure-1)%60) < 10) && (((secondmeasure-1)%60) >= 0) ? ((secondmeasure-1)%60)+9990 : ((secondmeasure-1)%60)
Substitute="-1":"59","999":"0"
[second+1measure]
Measure=Calc
Formula=((secondmeasure+2)%60) < 10 ? ((secondmeasure+2)%60)+9990 : ((secondmeasure+2)%60)
Substitute="999":"0"
[second+2measure]
Measure=Calc
Formula=((secondmeasure+3)%60) < 10 ? ((secondmeasure+3)%60)+9990 : ((secondmeasure+3)%60)
Substitute="999":"0"
Keep up what you're doing and the skin should come together in no time.
-
- Posts: 33
- Joined: May 4th, 2010, 4:38 pm
Re: can we change measured value in string meter
thanks very much.i never thought of adding a value and substituting it, very clever and it works like a charm:)
Also i decided to use png files for hour and minutes as it will be much more easy as its needed to calculate angles and positions to give the curved effect in text version.but for seconds your method works flawlessly..
Also i decided to use png files for hour and minutes as it will be much more easy as its needed to calculate angles and positions to give the curved effect in text version.but for seconds your method works flawlessly..