Hi, i want to make an arrow, moving up and down along a color scale and show the weather temperature value ?
It's possible?
like this:
Thanks
It is currently March 28th, 2024, 6:37 pm
Weather temperature Dynamic arrow
- balala
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Weather temperature Dynamic arrow
Definitely. I suppose you have the measure which returns the temperature. Let's name this as [MeasureTemp]. Also suppose you have the image of the arrow (Arrow.png).xenium wrote:Hi, i want to make an arrow, moving up and down along a color scale and show the weather temperature value ?
It's possible?
Then the Image meter showing the arrow should have the following form:
Code: Select all
[MeterInd]
Meter=Image
ImageName=#@#Arrow.png
X=0
Y=([MeterLine:H]*([MeasureTemp]-#Min#)/(#Max#-#Min#))
DynamicVariables=1
- In the above code, [MeterLine] is the meter with the color scale. Probably you have named it otherwise, replace its name.
- Define the Max and Min variables, in the [Variables] section of your skin. These variable must be equal with the largest and lowest value respectively, which can be properly shown by your skin (if the temperature is equal with Min the arrow will be at the top of the color scale and if it is equal to Max, at the bottom).
- A very important option, which must be added to the above Image meter is the DynamicVariables=1, because the meter uses section variables, which don't work without this option. Don't forget it.
Re: Weather temperature Dynamic arrow
It works !!!! Thanks so much !!!
with a small change to the above code (the minimum values were at the top of the color scale)
A small question: how do I display the temperature value on the same line as the arrow, as in the link to the above image?
Now the temperature value is displayed with a line above, as it is in the image
with a small change to the above code (the minimum values were at the top of the color scale)
A small question: how do I display the temperature value on the same line as the arrow, as in the link to the above image?
Now the temperature value is displayed with a line above, as it is in the image
Code: Select all
[Variables]
UpdateRateSeconds=100
URL=https://www.foreca.com/Botswana/Gaborone?tenday
URL1=https://www.foreca.com/Botswana/Gaborone
MinValue=-50
MaxValue=50
ColorTheme=255,255,255,255
######################
# Measures Section #
######################
[MeasureTemp]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#URL1#
RegExp="(?siU)<span class=".* txt-xxlarge"><strong>(.*)</strong>.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
############################
# Meters Display Section #
############################
[MeterScale]
Meter=Image
X=0
Y=0
ImageName=scale.png
[MeterInd]
Meter=Image
ImageName=arrow.png
X=113
Y=([MeterScale:H]*([MeasureTemp]-#MaxValue#)/(#MinValue#-#MaxValue#))
DynamicVariables=1
[MeterTemp]
MeasureName=MeasureTemp
Meter=String
X=150
Y=([MeterScale:H]*([MeasureTemp]-#MaxValue#)/(#MinValue#-#MaxValue#))
StringAlign=Left
FontFace=Tahoma
FontSize=14
FontColor=#ColorTheme#
AntiAlias=1
Text=%1°C
DynamicVariables=1
- eclectic-tech
- Rainmeter Sage
- Posts: 5382
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
- Contact:
Re: Weather temperature Dynamic arrow
Trey changing [MeterTemp] to:'R' means relative to the lower right corner of the previous meter; this meter X location will be directly to the right of the previous one.
'r' means relative to the upper left corner of the previous meter; this meter Y location will be the same as the previous one.
See: https://docs.rainmeter.net/manual/meters/general-options/#XY
Code: Select all
[MeterTemp]
MeasureName=MeasureTemp
Meter=String
X=R
Y=r
StringAlign=Left
FontFace=Tahoma
FontSize=14
FontColor=#ColorTheme#
AntiAlias=1
Text=%1°C
DynamicVariables=1
'r' means relative to the upper left corner of the previous meter; this meter Y location will be the same as the previous one.
See: https://docs.rainmeter.net/manual/meters/general-options/#XY
Re: Weather temperature Dynamic arrow
it does not work, it still remains with a line above
- eclectic-tech
- Rainmeter Sage
- Posts: 5382
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
- Contact:
Re: Weather temperature Dynamic arrow
Please post a rmskin package, with the skin and your images. There is no line in a string meter, so it probably is related to your images (which we can't see).xenium wrote:it does not work, it still remains with a line above
- balala
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Weather temperature Dynamic arrow
As eclectic-tech said, the best would be indeed to upload your config. But I also would make first a change to your code, let's see if this helps you.xenium wrote:A small question: how do I display the temperature value on the same line as the arrow, as in the link to the above image?
Replace the Y and StringAlign options of the [MeterTemp] meter with the following values:
Code: Select all
[MeterTemp]
...
Y=([MeterInd:H]/2)r
StringAlign=LeftCenter
If it still doesn't, then indeed should upload the packed skin, as eclectic-tech suggested.
Re: Weather temperature Dynamic arrow
It works !!!!
Thanks so much !!!
Thanks so much !!!
- balala
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Weather temperature Dynamic arrow
Which solution works?xenium wrote:It works !!!!