But it's only working now because you removed the UpdateDivider from the Graph, so it's gets updated every second, however i only want to update the Graph when the parser reads a new value from the site.jsmorley wrote:To be honest, I'd be tempted to stop fighting any "lag" with WebParser having to go out and get the information while the skin moves on, and just save and use a "persistent" previous value as a starting point. Then you can just let the skin operate without any intervention, and it will work about as well as can be expected.
Code: Select all
[Rainmeter] Update=1000 AccurateText=1 DynamicWindowSize=1 [ParsePrice] Measure=Plugin Plugin=Plugins\WebParser.dll URL=http://finance.yahoo.com/echarts?s=eurusd=x RegExp="(?siU).*<span class="time_rtq_ticker.*">.*>(.*)</span>" StringIndex=1 UpdateRate=100 FinishAction=[!SetOption CurrentPrice Formula "[ParsePrice]"][!WriteKeyValue CurrentPrice Formula "[ParsePrice]"] [CurrentPrice] Measure=Calc Formula=1.1200 [MeterStringPrice] Meter=String MeasureName=CurrentPrice W=50 H=14 FontSize=11 FontColor=255,255,255,255 SolidColor=27,37,47,255 Padding=5,5,5,5 NumOfDecimals=4 AntiAlias=1 [MeterLineGraphPrice] Meter=Line X=0 Y=0R W=60 H=20 MeasureName=CurrentPrice AutoScale=1 LineColor=250,186,0,255 SolidColor=57,67,77,255
It is currently May 6th, 2024, 3:34 am
Trailing Zeros
-
- Posts: 33
- Joined: May 1st, 2015, 1:25 am
Re: Trailing Zeros
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Trailing Zeros
Resike wrote: But it's only working now because you removed the UpdateDivider from the Graph, so it's gets updated every second, however i only want to update the Graph when the parser reads a new value from the site.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[ParsePrice]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=http://finance.yahoo.com/echarts?s=eurusd=x
RegExp="(?siU).*<span class="time_rtq_ticker.*">.*>(.*)</span>"
StringIndex=1
UpdateRate=100
FinishAction=[!SetOption CurrentPrice Formula "[ParsePrice]"][!WriteKeyValue CurrentPrice Formula "[ParsePrice]"][!UpdateMeasure CurrentPrice][!UpdateMeter *][!Redraw]
[CurrentPrice]
Measure=Calc
Formula=1.1200
[MeterStringPrice]
Meter=String
MeasureName=CurrentPrice
W=50
H=14
FontSize=11
FontColor=255,255,255,255
SolidColor=27,37,47,255
Padding=5,5,5,5
NumOfDecimals=4
AntiAlias=1
UpdateDivider=-1
[MeterLineGraphPrice]
Meter=Line
X=0
Y=0R
W=60
H=20
MeasureName=CurrentPrice
AutoScale=1
LineColor=250,186,0,255
SolidColor=57,67,77,255
UpdateDivider=-1
-
- Posts: 33
- Joined: May 1st, 2015, 1:25 am
Re: Trailing Zeros
I think this will be it, thanks for the help.jsmorley wrote:Make no mistake, I really hate the entire concept of a Line meter for this, it's mostly going to be a "zero" flatline for hours after you load/refresh it, but to each his own.Code: Select all
[Rainmeter] Update=1000 AccurateText=1 DynamicWindowSize=1 [ParsePrice] Measure=Plugin Plugin=Plugins\WebParser.dll URL=http://finance.yahoo.com/echarts?s=eurusd=x RegExp="(?siU).*<span class="time_rtq_ticker.*">.*>(.*)</span>" StringIndex=1 UpdateRate=100 FinishAction=[!SetOption CurrentPrice Formula "[ParsePrice]"][!WriteKeyValue CurrentPrice Formula "[ParsePrice]"][!UpdateMeasure CurrentPrice][!UpdateMeter *][!Redraw] [CurrentPrice] Measure=Calc Formula=1.1200 [MeterStringPrice] Meter=String MeasureName=CurrentPrice W=50 H=14 FontSize=11 FontColor=255,255,255,255 SolidColor=27,37,47,255 Padding=5,5,5,5 NumOfDecimals=4 AntiAlias=1 UpdateDivider=-1 [MeterLineGraphPrice] Meter=Line X=0 Y=0R W=60 H=20 MeasureName=CurrentPrice AutoScale=1 LineColor=250,186,0,255 SolidColor=57,67,77,255 UpdateDivider=-1
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Trailing Zeros
I'd be tempted to do something like this:
That way the meter will race to fill up with a valid value pretty quickly, then once it has done so, (I estimated about 100 updates at an update every 100 milliseconds works well enough) it "stops" the meters from updating until they are told to do so by the WebParser measure.
The UpdateRate=6000 on the WebParser measure makes sure it still only updates every 10 minutes, in spite of the lower skin Update.
Just visually more pleasing to me, since the meter won't spend hours mostly "zero".
Code: Select all
[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
[MeasureCounter]
Measure=Calc
Formula=MeasureCounter + 1
IfCondition=MeasureCounter >= 100
IfTrueAction=[!SetOptionGroup MyMeters UpdateDivider "-1"][!PauseMeasure MeasureCounter]
[ParsePrice]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=http://finance.yahoo.com/echarts?s=eurusd=x
RegExp="(?siU).*<span class="time_rtq_ticker.*">.*>(.*)</span>"
StringIndex=1
UpdateRate=6000
FinishAction=[!SetOption CurrentPrice Formula "[ParsePrice]"][!WriteKeyValue CurrentPrice Formula "[ParsePrice]"][!UpdateMeasure CurrentPrice][!UpdateMeterGroup MyMeters][!Redraw]
[CurrentPrice]
Measure=Calc
Formula=1.1200
[MeterStringPrice]
Meter=String
Group=MyMeters
MeasureName=CurrentPrice
W=50
H=14
FontSize=11
FontColor=255,255,255,255
SolidColor=27,37,47,255
Padding=5,5,5,5
NumOfDecimals=4
AntiAlias=1
[MeterLineGraphPrice]
Meter=Line
Group=MyMeters
X=0
Y=0R
W=60
H=20
MeasureName=CurrentPrice
AutoScale=1
LineColor=250,186,0,255
SolidColor=57,67,77,255
The UpdateRate=6000 on the WebParser measure makes sure it still only updates every 10 minutes, in spite of the lower skin Update.
Just visually more pleasing to me, since the meter won't spend hours mostly "zero".
-
- Posts: 33
- Joined: May 1st, 2015, 1:25 am
Re: Trailing Zeros
I was thing thinking about creating a custom refresh icon, which will force the parse to run (maybe with a timeout function to prevent spam) and update and redraw the prices, but only feed the Graph with the new parse value, in this case the Graph wont loose it's vaules on refresh.
-
- Posts: 33
- Joined: May 1st, 2015, 1:25 am
Re: Trailing Zeros
Is is possible the line meter to show minus values?
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Trailing Zeros
Not sure I follow. A Line meter doesn't show "values" at all, but a "percentage" that a value is of the total range the value can be.Resike wrote:Is is possible the line meter to show minus values?
So a measure that can be anything from -10 to 10 for instance would be displayed in a Line meter with -10 as 0%, 0 as 50%, and 10 as 100%. The fact that a number is negative doesn't have any meaning to a Line meter, only what percentage any number is of the "total".
So the answer is "yes" it can "use" negative values, but "no" it can't "show" negative values. I hope I'm understanding your question, I may well not...
-
- Posts: 33
- Joined: May 1st, 2015, 1:25 am
Re: Trailing Zeros
I guess this also applies to Histograms. Personally i would like the line to drop below it's initial value when it gets a minus value. Maybe i should flip the line on minus values?jsmorley wrote: Not sure I follow. A Line meter doesn't show "values" at all, but a "percentage" that a value is of the total range the value can be.
So a measure that can be anything from -10 to 10 for instance would be displayed in a Line meter with -10 as 0%, 0 as 50%, and 10 as 100%. The fact that a number is negative doesn't have any meaning to a Line meter, only what percentage any number is of the "total".
So the answer is "yes" it can "use" negative values, but "no" it can't "show" negative values. I hope I'm understanding your question, I may well not...
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Trailing Zeros
I still don't follow. The Line meter is defined as some W and H (width and height). The values are plotted on that with the bottom being 0% and the top being 100%. It doesn't matter what the bottom or least "value" is, whatever it is, it is 0% of the range being measured. You simply can't logically have a negative "percentage", as well, I don't even understand that. Where does it plot it in the meter?Resike wrote: I guess this also applies to Histograms. Personally i would like the line to drop below it's initial value when it gets a minus value.