It is currently April 18th, 2024, 11:56 am
Monitor a (part of) the website
-
- Rainmeter Sage
- Posts: 5391
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Monitor a (part of) the website
Always happy to help!
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 908
- Joined: December 30th, 2015, 9:47 am
Re: Monitor a (part of) the website
Hi SophieR.
If the code is "[PlayLoop chime.wav]", you have to locate the sound file in same folder to the ini file. But if you locate it in @Resources folder, the code must be as "[PlayLoop #@#chime.wav]".
If the code is "[PlayLoop chime.wav]", you have to locate the sound file in same folder to the ini file. But if you locate it in @Resources folder, the code must be as "[PlayLoop #@#chime.wav]".
-
- Posts: 16
- Joined: January 2nd, 2017, 11:04 pm
Re: Monitor a (part of) the website
Tested it today and it works like a charm.
Can it be modified a bit more, to alert me only when the total number goes up (and not when it drops)?
Can it be modified a bit more, to alert me only when the total number goes up (and not when it drops)?
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Monitor a (part of) the website
A very simple solution: you need a measure which returns the largest value achieved so far:SophieR wrote:Can it be modified a bit more, to alert me only when the total number goes up (and not when it drops)?
Code: Select all
[MeasureMax]
Measure=Calc
Formula=( Max ( GeoMeasure, MeasureMax ))
The last thing you need is an OnChangeAction, to check when the value of the [MeasureMax] measure is changing:
Code: Select all
[MeasureMax]
Measure=Calc
Formula=( Max ( GeoMeasure, MeasureMax ))
OnChangeAction=[PlayLoop chime.wav]"]
-
- Posts: 16
- Joined: January 2nd, 2017, 11:04 pm
Re: Monitor a (part of) the website
Great, thank you!
So, I assume I have to remove OnChangeAction from GeoMeasure?
Like that:
So, I assume I have to remove OnChangeAction from GeoMeasure?
Like that:
Code: Select all
[GeoMeasure]
Measure=Plugin
Plugin=Webparser
URL=#GeoURL#
RegExp=(?siU)Total Records: <b>(.*)</b>
StringIndex=1
UpdateRate=60
[MeasureMax]
Measure=Calc
Formula=( Max ( GeoMeasure, MeasureMax ))
OnChangeAction=[!SetOption GeoMeasure OnChangeAction "[!SetOption GeoMeter FontColor 255,0,0][PlayLoop chime.wav]"]
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Monitor a (part of) the website
Yeah, obviously.SophieR wrote:So, I assume I have to remove OnChangeAction from GeoMeasure?
-
- Posts: 16
- Joined: January 2nd, 2017, 11:04 pm
Re: Monitor a (part of) the website
After a few days of testing, I must say the last change doesn't work as intended. The numbers are constantly changing (up and down) and I'm still alerted on every change, not only when the counter goes up.
Here is the code I'm currently using:
Any help, please?
Here is the code I'm currently using:
Code: Select all
[Rainmeter]
Update=1000
[Variables]
GeoURL=https://www.geocaching.com/seek/nearest.aspx?country_id=207&as=1&ex=0&cFilter=9a79e6ce-3344-409c-bbe9-496530baf758&children=n
FontColor=255,255,255,255
FontName=Open Sans
FontHeight=10
[GeoMeasure]
Measure=Plugin
Plugin=Webparser
URL=#GeoURL#
RegExp=(?siU)Total Records: <b>(.*)</b>
StringIndex=1
UpdateRate=60
[MeasureMax]
Measure=Calc
Formula=( Max ( GeoMeasure, MeasureMax ))
OnChangeAction=[!SetOption GeoMeasure OnChangeAction "[!SetOption GeoMeter FontColor 255,227,117][PlayLoop chime.wav]"]
[MeterGeoImage]
Meter=IMAGE
ImageName=geo.png
X=0
Y=0
W=35
H=35
LeftMouseUpAction=[PlayStop][!SetOption GeoMeter FontColor 255,255,255,255][#GeoURL#]
SolidColor=0,0,0,1
[GeoMeter]
Meter=String
MeasureName=GeoMeasure
X=262
Y=8
W=500
StringAlign=RIGHT
StringCase=UPPER
StringStyle=BOLD
FontColor=#FontColor#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Text=Total Number: %1
LeftMouseUpAction=[PlayStop][!SetOption GeoMeter FontColor 255,255,255,255][#GeoURL#]
SolidColor=0,0,0,1
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Monitor a (part of) the website
Ok, I have to test your code for a while. I hope I'll come back soon.SophieR wrote:After a few days of testing, I must say the last change doesn't work as intended. The numbers are constantly changing (up and down) and I'm still alerted on every change, not only when the counter goes up.
-
- Posts: 16
- Joined: January 2nd, 2017, 11:04 pm
Re: Monitor a (part of) the website
Thank you.
To get faster results, maybe try switching to some other country that has more active caching community. Germany for instance. The numbers should be changing faster there. Replace this part of the code:
with this:
To get faster results, maybe try switching to some other country that has more active caching community. Germany for instance. The numbers should be changing faster there. Replace this part of the code:
Code: Select all
https://www.geocaching.com/seek/nearest.aspx?country_id=207&as=1&ex=0&cFilter=9a79e6ce-3344-409c-bbe9-496530baf758&children=n
Code: Select all
https://www.geocaching.com/seek/nearest.aspx?country_id=79&as=1&ex=0&cFilter=9a79e6ce-3344-409c-bbe9-496530baf758&children=n
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Monitor a (part of) the website
Replace the OnChangeAction option of the [MeasureMax] measure, with the following: OnChangeAction=[PlayLoop #@#alarm.wav] or OnChangeAction=[!SetOption GeoMeter FontColor [color=#FF0000]"[/color]255,227,117[color=#FF0000]"[/color]][PlayLoop #@#alarm.wav].
Don't forget the quotation marks around the color code (marked red above), because the color code, although that is composed by three (or four) numbers, is a string, so it requires those marks.
If you apply this solution, when you refresh the skin, the sound will start playing. Stop it, clicking any of the [MeterGeoImage] or the [GeoMeter] meter. This is occurring because initially (before the [GeoMeasure] measure return the value) the value of [MeasureMax] measure is 0, but this will be increased once the [GeoMeasure] measure returns a not zero value.
After this, the sound will be played just when the value returned by the [GeoMeasure] measure, increase.
Don't forget the quotation marks around the color code (marked red above), because the color code, although that is composed by three (or four) numbers, is a string, so it requires those marks.
If you apply this solution, when you refresh the skin, the sound will start playing. Stop it, clicking any of the [MeterGeoImage] or the [GeoMeter] meter. This is occurring because initially (before the [GeoMeasure] measure return the value) the value of [MeasureMax] measure is 0, but this will be increased once the [GeoMeasure] measure returns a not zero value.
After this, the sound will be played just when the value returned by the [GeoMeasure] measure, increase.