It is currently April 23rd, 2024, 4:43 pm

Little help v2

Get help with creating, editing & fixing problems with skins
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Little help v2

Post by JamX »

I wanted to automate a text in the weatherskin to change from "Today" to "Tonight" based on the reading [@ForecastTodayDayTemperature] like JSMorley has described on page 17 of the "Weather Skins Not Working" tread.
But I only need the text to change and not al the other items he describes, so I come up with this:

Code: Select all

[MeasureToggleAtNight]
Measure=String
Group=Weather
String=[@ForecastTodayDayTemperature]
DynamicVariables=1
IfMatch=^$
IfMatchAction=[!log "Tonight"][!Setoption MeterDay Text "Tonight"
IfNotMatchAction=[!log "Today"][!Setoption MeterDay Text "Today"
This is located in the WeatherComJSONMeasures.inc file

This is the meter I want this text to be displayed:

Code: Select all

[MeterDay]
Meter=STRING
MeterStyle=StyleNumbers
X=-360r
Y=80r
This is located in the Weather.ini file

But I do not see any text for this meter in the skin. (see Red circle)

Somebody an idea why?
Capture.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Little help v2

Post by jsmorley »

JamX wrote: August 4th, 2020, 7:04 pm I wanted to automate a text in the weatherskin to change from "Today" to "Tonight" based on the reading [@ForecastTodayDayTemperature] like JSMorley has described on page 17 of the "Weather Skins Not Working" tread.
But I only need the text to change and not al the other items he describes, so I come up with this:

Code: Select all

[MeasureToggleAtNight]
Measure=String
Group=Weather
String=[@ForecastTodayDayTemperature]
DynamicVariables=1
IfMatch=^$
IfMatchAction=[!log "Tonight"][!Setoption MeterDay Text "Tonight"
IfNotMatchAction=[!log "Today"][!Setoption MeterDay Text "Today"
This is located in the WeatherComJSONMeasures.inc file

This is the meter I want this text to be displayed:

Code: Select all

[MeterDay]
Meter=STRING
MeterStyle=StyleNumbers
X=-360r
Y=80r
This is located in the Weather.ini file

But I do not see any text for this meter in the skin. (see Red circle)

Somebody an idea why?

Capture.JPG
You are missing the closing ] characters on your !SetOption bangs.
User avatar
balala
Rainmeter Sage
Posts: 16162
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Little help v2

Post by balala »

EDIT: Sorry jsmorley, being a little bit late...
JamX wrote: August 4th, 2020, 7:04 pm Somebody an idea why?
Yep. You forgot to close the brackets of the !SetOption bangs in the IfMatchAction and IfNotMatchAction options of the [MeasureToggleAtNight] measure:

Code: Select all

[MeasureToggleAtNight]
Measure=String
Group=Weather
String=[@ForecastTodayDayTemperature]
DynamicVariables=1
IfMatch=^$
IfMatchAction=[!log "Tonight"][!Setoption MeterDay Text "Tonight"]
IfNotMatchAction=[!log "Today"][!Setoption MeterDay Text "Today"]
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: Little help v2

Post by JamX »

I am stupid. :?

Thank.

Now it works
Capture.JPG
You do not have the required permissions to view the files attached to this post.
Last edited by JamX on August 4th, 2020, 7:12 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Little help v2

Post by jsmorley »

JamX wrote: August 4th, 2020, 7:11 pm I am stupid. :?

Thank.

Now it works
Image
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: Little help v2

Post by JamX »

jsmorley wrote: August 4th, 2020, 7:12 pm Image
That's the feeling.
User avatar
balala
Rainmeter Sage
Posts: 16162
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Little help v2

Post by balala »

JamX wrote: August 4th, 2020, 7:11 pm I am stupid. :?
No, you are not. Such mistakes are happening from time to time.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Little help v2

Post by jsmorley »

😜