It is currently April 24th, 2024, 4:48 pm

Help Formula

Get help with creating, editing & fixing problems with skins
User avatar
xenium
Posts: 866
Joined: January 4th, 2018, 9:52 pm

Re: Help Formula

Post by xenium »

balala wrote:That's a regular expression substitution (Substitute="^(\d{1,2})$":"#@#MoonFrame\\1.jpg"). There is nothing substituted with 1.jpg. ":"#@#MoonFrame\[color=#FF0000]\1.jpg[/color] means the first found expression in (\d{1,2})$.
I'm sorry, but I don't think you get an error message, because the [MeasureImage] measure is disabled in the very first moment, being enabled when the WebParser measures get their values. But after this, the value of the [MeasureImage] measure is never 0 again.

However let me know how does it work, after the Full Moon too.
This is the error that appears at 1.jpg :
Capture.PNG
Edited:
I Fixed This Error:
I did not replace 1.jpg, but I added a blank image named MoonFrame0.jpg in the Resources folder and the error disappeared.
I remembered that such an error in Log, appeared to me on a skin (LIVEWeather) and I solved it the same with a blank image.
Both skins have many numbered images.
I do not know why this error occurs.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16166
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help Formula

Post by balala »

Have you modified the code? If you did, please post the current one.
User avatar
xenium
Posts: 866
Joined: January 4th, 2018, 9:52 pm

Re: Help Formula

Post by xenium »

balala wrote:Have you modified the code? If you did, please post the current one.
The code has not been changed.
I added, just that blank image in Resources folder, to disappear the Log error.
User avatar
balala
Rainmeter Sage
Posts: 16166
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help Formula

Post by balala »

xenium wrote:I added, just that blank image in Resources folder, to disappear the Log error.
Yep, this is a solution.
Glad if you got it working well.
User avatar
xenium
Posts: 866
Joined: January 4th, 2018, 9:52 pm

Re: Help Formula

Post by xenium »

balala wrote: October 11th, 2018, 8:31 pm let me know how does it work
I came back with 2 observations:
1.The [MeasureImage] measure from the code here https://forum.rainmeter.net/viewtopic.php?p=153470#p153470 ,after 14 days,no longer displays images.
BUT...
2. Using the measures [MeasureImage], [MeasureA] and [MeasureB] from the code here https://forum.rainmeter.net/viewtopic.php?p=153468#p153468 the images are displayed after 14 days :

Code: Select all

[MeasureMoonPercent]
Measure=WebParser
Url=http://iohelix.net/moon/moonlite.xml
RegExp=(?siU)<moon>.*<elongationToSun>.*</elongationToSun>.*<percentIlluminated>(.*)</percentIlluminated>.*<age>(.*)</age>.*<phase>(.*)</phase>.*<length>.*</length>
UpdateRate=#Updaterate#
FinishAction=[!EnableMeasure "MeasureImage"][!EnableMeasure "MeasureA"][!EnableMeasure "MeasureB"][!UpdateMeasure "MeasureImage"][!UpdateMeasure "MeasureA"][!UpdateMeasure "MeasureB"]
StringIndex=1


[MeasureMoonAge]
Measure=WebParser
Url=[MeasureMoonPercent]
StringIndex=2

[MeasureA]
Measure=Calc
Formula=( Floor ( [MeasureMoonPercent] ))
DynamicVariables=1
Disabled=1

[MeasureB]
Measure=Calc
Formula=( 100 + Floor ( [MeasureMoonPercent] ))
DynamicVariables=1
Disabled=1

[MeasureImage]
Measure=Calc
Formula=(( [MeasureMoonAge] <= 14 ) ? MeasureA : MeasureB )
DynamicVariables=1
Disabled=1

[MeterMoonImage]
Meter=Image
X=50
Y=50
W=128
H=128
ImageName=#@#MoonFrame\[MeasureImage].jpg
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16166
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help Formula

Post by balala »

xenium wrote: October 24th, 2018, 7:35 am I came back with 2 observations:
I think I don't have the needed images, so finally I can't test how they are shown up. The measures are returning the desired values, but what the Image meter shows I don't know.
So, please pack and upload the whole config.