It is currently March 19th, 2024, 11:50 am

JSMorley's Weather.com skin

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSMorley's Weather.com skin

Post by jsmorley »

sl23 wrote: September 15th, 2021, 5:02 pm Ok thanks.So, where would I put the min/max values for the Roundline meter? I have this so far...

Code: Select all

[sRoundBar]
LineStart=22
LineLength=29
LineWidth=2
LineColor=#TempColour#
StartAngle=(Rad(270))
Antialias=1
Solid=0
DynamicVariables=1

[CurrentTempRound]
Meter=Roundline
MeterStyle=sRoundBar
MeasureName=@CurrentTemperature
Group=
X=245
Y=37
You will need to create an "override" measure in your skin for that measure from the template. This is because you DO NOT want to ever change anything in the @Include .inc file.

So like:

Code: Select all

[MeasureNewTemp]
Measure=Calc
Formula=[@CurrentTemperature]
DynamicVariables=1
MinValue=-100
MaxValue=150
Then use:

MeasureName=MeasureNewTemp

On your meter.
Last edited by Brian on September 15th, 2021, 6:25 pm, edited 1 time in total.
Reason: Please use [code] tags. It's the </> button. :-)
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: JSMorley's Weather.com skin

Post by sl23 »

Great, that seems to work a treat, thanks :thumbup:
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: JSMorley's Weather.com skin

Post by death.crafter »

Once in a millennia:
Screenshot_20210916-005151453 (1)~2.jpg
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSMorley's Weather.com skin

Post by jsmorley »

death.crafter wrote: September 15th, 2021, 7:29 pm Once in a millennia:

Screenshot_20210916-005151453 (1)~2.jpg
Yeah, he's a wiseguy... ;-)
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: JSMorley's Weather.com skin

Post by sl23 »

:rofl:

Could I just ask for some help with the colour changing of the Roundline meter depending on CurrentTemp please.

I've got this, but I don't know if I'm using the IfCondition correctly...

Code: Select all

[sAllText]
FontFace=Trebuchet MS
StringStyle=Normal
StringAlign=Center
FontSize=10
FontColor=#Color1#
StringEffect=Shadow
FontEffectColor=0,0,0,150
AntiAlias=1
Group=Meters

[sRoundBar]
LineStart=22
LineLength=29
LineWidth=4
LineColor=#Color1#
StartAngle=(Rad(270))
Antialias=1
Solid=0
DynamicVariables=1

[CurrentTemp]
Meter=String
MeterStyle=sAllText
StringStyle=Bold
FontSize=12
MeasureName=@CurrentTemperature
MeasureName2=@UnitsTemperature
Text=%1#Degrees#%2
InlineSetting=Size | 8
InlinePattern=.+(..)
Group=
X=245
Y=28

[mNewTemp]
Measure=Calc
Formula=[@CurrentTemperature]
MinValue=#Min#
MaxValue=#Max#
DynamicVariables=1
IfCondition=(@CurrentTemperature <= 5)
IfTrueAction=[!SetOption CurrentTempRound2 LineColor #TempColour3#]
IfCondition2=(@CurrentTemperature > 5) && (@CurrentTemperature < 25)
IfTrueAction2=[!SetOption CurrentTempRound2 LineColor #TempColour1#]
IfCondition3=(@CurrentTemperature >= 25)
IfTrueAction3=[!SetOption CurrentTempRound2 LineColor #TempColour3#]

[CurrentTempRound1]
Meter=Roundline
MeterStyle=sRoundBar
MeasureName=mNewTemp
LineColor=#TempColour1#
Solid=1
Group=
X=245
Y=37

[CurrentTempRound2]
Meter=Roundline
MeterStyle=sRoundBar
MeasureName=mNewTemp
LineColor=#TempColour5#
Group=
X=245
Y=37

In the About/Skins window, the returned Number and String for @CurrentTemperature is at 14, but the colour doesn't change.
I'm thinking that the IfCondition can't be used on a Calc Measure? So I tried to create another Measure that directly measured the @CurrentTemperature for the IfCondition, but this failed to change colour also. Any ideas? :confused:
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: JSMorley's Weather.com skin

Post by sl23 »

I tried adding this...

Code: Select all

[MeasureTemp]
Measure=@CurrentTemperature
DynamicVariables=1
IfCondition=(@CurrentTemperature <= 19)
IfTrueAction=[!SetOption CurrentTempRound1 LineColor "#TempColour1#"]
IfCondition2=(@CurrentTemperature > 19) && (@CurrentTemperature < 25)
IfTrueAction2=[!SetOption CurrentTempRound1 LineColor "#TempColour2#"]
IfCondition3=(@CurrentTemperature >= 25)
IfTrueAction3=[!SetOption CurrentTempRound1 LineColor "#TempColour3#"]
And this...

Code: Select all

[MeasureTemp]
Measure=String
String=[@CurrentTemperature]
DynamicVariables=1
IfCondition=(@CurrentTemperature <= 19)
IfTrueAction=[!SetOption CurrentTempRound1 LineColor "#TempColour1#"]
IfCondition2=(@CurrentTemperature > 19) && (@CurrentTemperature < 23)
IfTrueAction2=[!SetOption CurrentTempRound1 LineColor "#TempColour2#"]
IfCondition3=(@CurrentTemperature >= 23)
IfTrueAction3=[!SetOption CurrentTempRound1 LineColor "#TempColour3#"]
But think I'm missing something?
Please can someone help :Whistle
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: JSMorley's Weather.com skin

Post by jsmorley »

That second one looks about right to me.

It can be simplified a bit:

Code: Select all

[MeasureSetColor]
Measure=Calc
IfCondition=(@CurrentTemperature <= 19)
IfTrueAction=[!SetOption CurrentTempRound1 LineColor "#TempColour1#"]
IfCondition2=(@CurrentTemperature > 19) && (@CurrentTemperature < 23)
IfTrueAction2=[!SetOption CurrentTempRound1 LineColor "#TempColour2#"]
IfCondition3=(@CurrentTemperature >= 23)
IfTrueAction3=[!SetOption CurrentTempRound1 LineColor "#TempColour3#"]
It doesn't matter what the value of [MeasureSetColor] is, it's not being used anywhere. It's just a "host" for the IfConditions, which can be any measure. The IfConditions explicitly ask for the value of some defined measure(s), so they are not dependent on any value on the measure they are on.

If you are having trouble with what you have, all I can suggest is that you be very certain about the name of the CurrentTempRound1 measure, the values of the #TempColour1# and such variables, and that you don't perhaps already have a measure called [MeasureTemp], which would cause a conflict.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: JSMorley's Weather.com skin

Post by sl23 »

Ok, I don't think there's any duplicate Measures, but I renamed the new one mTemp just to be sure.
I copied your code to see if that would work, as mine doesn't, and that still isn't working.

After looking at yours, why would my original code not work?

Code: Select all

[mNewTemp]
Measure=Calc
Formula=[@CurrentTemperature]
MinValue=#Min#
MaxValue=#Max#
DynamicVariables=1
IfCondition=(@CurrentTemperature <= 19)
IfTrueAction=[!SetOption CurrentTempRound1 LineColor #TempColour1#]
IfCondition2=(@CurrentTemperature > 19) && (@CurrentTemperature < 25)
IfTrueAction2=[!SetOption CurrentTempRound1 LineColor #TempColour2#]
IfCondition3=(@CurrentTemperature >= 25)
IfTrueAction3=[!SetOption CurrentTempRound1 LineColor #TempColour3#]
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5364
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: JSMorley's Weather.com skin

Post by eclectic-tech »

sl23 wrote: September 18th, 2021, 4:23 pm Ok, I don't think there's any duplicate Measures, but I renamed the new one mTemp just to be sure.
I copied your code to see if that would work, as mine doesn't, and that still isn't working.

After looking at yours, why would my original code not work?

Code: Select all

[mNewTemp]
Measure=Calc
Formula=[@CurrentTemperature]
MinValue=#Min#
MaxValue=#Max#
DynamicVariables=1
IfCondition=(@CurrentTemperature <= 19)
IfTrueAction=[!SetOption CurrentTempRound1 LineColor #TempColour1#]
IfCondition2=(@CurrentTemperature > 19) && (@CurrentTemperature < 25)
IfTrueAction2=[!SetOption CurrentTempRound1 LineColor #TempColour2#]
IfCondition3=(@CurrentTemperature >= 25)
IfTrueAction3=[!SetOption CurrentTempRound1 LineColor #TempColour3#]
What is the string value being reported in the log for your skin as the @CurrentTemperature?

A few errors '@CurrentTemperature' is not valid, you are checking the value of a measure,
so it should be IfCondition=([@CurrentTemperature] <= 19).

Better yet, you already defined the value of the [mNewTemp] measure in the Formula as the string value of [@CurrentTemperature]. You could use that in your IfConditions: IfCondition=([mNewTemp] <= 19)

With that change you should see the color change when the temp does, if you have DynamicVariables=1 on the Roundline meter.
User avatar
balala
Rainmeter Sage
Posts: 16091
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: JSMorley's Weather.com skin

Post by balala »

eclectic-tech wrote: September 18th, 2021, 5:14 pm Better yet, you already defined the value of the [mNewTemp] measure in the Formula as the string value of [@CurrentTemperature]. You could use that in your IfConditions: IfCondition=([mNewTemp] <= 19)
In fact, since in the Formula option already is used the string value, there is not needed to use the name of the measure as a section variable. IfCondition=(mNewTemp <= 19) (no brackets) is perfectly right and does work.
Post Reply