It is currently October 13th, 2024, 1:25 am

WebParser.dll

Get help with creating, editing & fixing problems with skins
FancoverFive
Posts: 9
Joined: June 18th, 2010, 9:53 pm

WebParser.dll

Post by FancoverFive »

Okay, I've started reading the documentation about creating skins and it's rather confusing. Regarding the WebParser.dll plugin, the variable "UpdateRate" states how many milliseconds between updating, right? The text days at the "Anatomy of a Skin" page: "You DO NOT want to hit a web site once a second, as you will be seen as a DOS attack..." etc. Then in the example, the UpdateRate is set to "600", which is surely even MORE often than once a second? The RSS skin I downloaded also has it set to 600. What's going on here?

EDIT: Also, how do I add more lines to VClouds RSS? I extended the MeasureItem and MeasureLink downwards, changing the final number each time, and changing the StringIndex each time. I also extended the Meters as well in a similar fashion, but there's still only 10 feeds shown.
poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

Re: WebParser.dll

Post by poiru »

UpdateRate is calculated like this: Update (under [Rainmeter], default is 1 sec) x UpdateRate. So 1 sec x 600 = 600 seconds.
EDIT: Also, how do I add more lines to VClouds RSS? I extended the MeasureItem and MeasureLink downwards, changing the final number each time, and changing the StringIndex each time. I also extended the Meters as well in a similar fashion, but there's still only 10 feeds shown.
You need to add stuff to the RegExp= line.
FancoverFive
Posts: 9
Joined: June 18th, 2010, 9:53 pm

Re: WebParser.dll

Post by FancoverFive »

poiru wrote:UpdateRate is calculated like this: Update (under [Rainmeter], default is 1 sec) x UpdateRate. So 1 sec x 600 = 600 seconds.
Oh, OK, that makes sense.
poiru wrote:You need to add stuff to the RegExp= line.
Like what? The code is

Code: Select all

RegExp="(?siU)<title.*>(.*)</title>.*<link.*>(.*)</link>.*<item.*<title.*>(.*)</title>.*<link.*>(.*)</link>(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)"
but what do I add?
poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

Re: WebParser.dll

Post by poiru »

(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)

That gets the title and link for one item. Add that to the end of the RegExp line BEFORE the " to get one more item.
FancoverFive
Posts: 9
Joined: June 18th, 2010, 9:53 pm

Re: WebParser.dll

Post by FancoverFive »

No, that still doesn't work.

Here's the full code:

Code: Select all

[Rainmeter]
Update=1000
Author=VClouds
;Metadata added by RainBrowser
;http://rainmeter.net/RainWiki/index.php?title=Rainmeter_101#.5BMetadata.5D

[Metadata]
Name=
Config=
Description=RSS feed...
Instructions=
Version=
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=
Preview=

;End of added Metadata

[Variables]
@include=#SKINSPATH#\VClouds RSS\UserVariables.inc
@include1=#SKINSPATH#\VClouds RSS\Reader1\UserVariables.inc


[Feed]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=#RSS1#
RegExp="(?siU)<title.*>(.*)</title>.*<link.*>(.*)</link>.*<item.*<title.*>(.*)</title>.*<link.*>(.*)</link>(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)(?(?

=.*<item).*<title.*>(.*)</title>.*<link.*>(.*)</link>)"
UpdateRate=600
StringIndex=1
Substitute=#SubstituteFeed#

[FeedURL]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=2
Substitute=#SubstituteFeed#

[MeasureItem1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=3
Substitute=#SubstituteFeed#

[MeasureLink1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=4
Substitute=#SubstituteLink#

---

[MeasureItem2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=5
Substitute=#SubstituteFeed#

[MeasureLink2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=6
Substitute=#SubstituteLink#

---

[MeasureItem3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=7
Substitute=#SubstituteFeed#

[MeasureLink3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=8
Substitute=#SubstituteLink#

---

[MeasureItem4]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=9
Substitute=#SubstituteFeed#

[MeasureLink4]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=10
Substitute=#SubstituteLink#

---

[MeasureItem5]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=11
Substitute=#SubstituteFeed#

[MeasureLink5]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=12
Substitute=#SubstituteLink#

---

[MeasureItem6]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=13
Substitute=#SubstituteFeed#

[MeasureLink6]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=14
Substitute=#SubstituteLink#

---

[MeasureItem7]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=15
Substitute=#SubstituteFeed#

[MeasureLink7]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=16
Substitute=#SubstituteLink#

---

[MeasureItem8]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=17
Substitute=#SubstituteFeed#

[MeasureLink8]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=18
Substitute=#SubstituteLink#

---

[MeasureItem9]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=19
Substitute=#SubstituteFeed#

[MeasureLink9]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=20
Substitute=#SubstituteLink#

---

[MeasureItem10]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=21
Substitute=#SubstituteFeed#

[MeasureLink10]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=22
Substitute=#SubstituteLink#

---

;[MeasureItem11]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=23
Substitute=#SubstituteFeed#

;[MeasureLink11]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=24
Substitute=#SubstituteLink#
---

;[MeasureItem12]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=25
Substitute=#SubstituteFeed#

;[MeasureLink12]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=26
Substitute=#SubstituteLink#
---

;[MeasureItem13]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=27
Substitute=#SubstituteFeed#

;[MeasureLink13]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=28
Substitute=#SubstituteLink#
---

;[MeasureItem14]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=29
Substitute=#SubstituteFeed#

;[MeasureLink14]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=30
Substitute=#SubstituteLink#
---

;[MeasureItem15]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=31
Substitute=#SubstituteFeed#

;[MeasureLink15]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=32
Substitute=#SubstituteLink#
---

;[MeasureItem16]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=33
Substitute=#SubstituteFeed#

;[MeasureLink16]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=34
Substitute=#SubstituteLink#

; ------------------------------------------------------------------------------------------------
; STYLES

[StyleItem]
X=0
Y=15r
H=15
W=#width#
ClipString=1
StringStyle=NORMAL
FontColor=#Color1#
FontSize=9
FontFace=#Font#
AntiAlias=1
StringEffect=SHADOW
SolidColor=0,0,0,1

[StyleLink]
X=r
Y=r
H=15
W=#width#
ClipString=1
StringStyle=NORMAL
FontColor=#ColorActive#
FontSize=9
FontFace=#Font#
AntiAlias=1
StringEffect=SHADOW
Hidden=1
SolidColor=0,0,0,1

; ------------------------------------------------------------------------------------------------
; METERS




[Title]
Meter=STRING
MeasureName=Feed
Text="#RSS1title#"
X=21
Y=-4
H=15
W=150
FontColor=#Color2#
FontSize=18
FontFace=Segoe UI
AntiAlias=1
SolidColor=0,0,0,1
StringEffect=SHADOW

[TitleActive]
Meter=STRING
MeterStyle=Title
MeasureName=Feed
FontColor=#ColorActive#
SolidColor=0,0,0,1
Hidden=1
StringEffect=SHADOW

[Icon]
Meter=IMAGE
ImageName=RSS.png
X=0
Y=0
W=25
H=25
AntiAlias=1


;-----------------------
; ITEMS

[Item1]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem1
Y=27
LeftMouseDownAction=!execute [!RainmeterShowMeter Link1][!RainmeterHideMeter Item1][!RainmeterRedraw]

[Link1]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem1
LeftMouseUpAction=!Execute [[MeasureLink1]][!RainmeterShowMeter Item1][!RainmeterHideMeter Link1][!RainmeterRedraw]

[Item2]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem2
LeftMouseDownAction=!execute [!RainmeterShowMeter Link2][!RainmeterHideMeter Item2][!RainmeterRedraw]

[Link2]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem2
LeftMouseUpAction=!Execute [[MeasureLink2]][!RainmeterShowMeter Item2][!RainmeterHideMeter Link2][!RainmeterRedraw]

[Item3]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem3
LeftMouseDownAction=!execute [!RainmeterShowMeter Link3][!RainmeterHideMeter Item3][!RainmeterRedraw]

[Link3]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem3
LeftMouseUpAction=!Execute [[MeasureLink3]][!RainmeterShowMeter Item3][!RainmeterHideMeter Link3][!RainmeterRedraw]

[Item4]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem4
LeftMouseDownAction=!execute [!RainmeterShowMeter Link4][!RainmeterHideMeter Item4][!RainmeterRedraw]

[Link4]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem4
LeftMouseUpAction=!Execute [[MeasureLink4]][!RainmeterShowMeter Item4][!RainmeterHideMeter Link4][!RainmeterRedraw]

[Item5]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem5
LeftMouseDownAction=!execute [!RainmeterShowMeter Link5][!RainmeterHideMeter Item5][!RainmeterRedraw]

[Link5]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem5
LeftMouseUpAction=!Execute [[MeasureLink5]][!RainmeterShowMeter Item5][!RainmeterHideMeter Link5][!RainmeterRedraw]

[Item6]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem6
LeftMouseDownAction=!execute [!RainmeterShowMeter Link6][!RainmeterHideMeter Item6][!RainmeterRedraw]

[Link6]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem6
LeftMouseUpAction=!Execute [[MeasureLink6]][!RainmeterShowMeter Item6][!RainmeterHideMeter Link6][!RainmeterRedraw]

[Item7]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem7
LeftMouseDownAction=!execute [!RainmeterShowMeter Link7][!RainmeterHideMeter Item7][!RainmeterRedraw]

[Link7]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem7
LeftMouseUpAction=!Execute [[MeasureLink7]][!RainmeterShowMeter Item7][!RainmeterHideMeter Link7][!RainmeterRedraw]

[Item8]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem8
LeftMouseDownAction=!execute [!RainmeterShowMeter Link8][!RainmeterHideMeter Item8][!RainmeterRedraw]

[Link8]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem8
LeftMouseUpAction=!Execute [[MeasureLink8]][!RainmeterShowMeter Item8][!RainmeterHideMeter Link8][!RainmeterRedraw]

[Item9]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem9
LeftMouseDownAction=!execute [!RainmeterShowMeter Link9][!RainmeterHideMeter Item9][!RainmeterRedraw]

[Link9]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem9
LeftMouseUpAction=!Execute [[MeasureLink9]][!RainmeterShowMeter Item9][!RainmeterHideMeter Link9][!RainmeterRedraw]

[Item10]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem10
LeftMouseDownAction=!execute [!RainmeterShowMeter Link10][!RainmeterHideMeter Item10][!RainmeterRedraw]

[Link10]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem10
LeftMouseUpAction=!Execute [[MeasureLink10]][!RainmeterShowMeter Item10][!RainmeterHideMeter Link10][!RainmeterRedraw]

;[Item11]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem11
LeftMouseDownAction=!execute [!RainmeterShowMeter Link11][!RainmeterHideMeter Item11][!RainmeterRedraw]

;[Link11]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem11
LeftMouseUpAction=!Execute [[MeasureLink11]][!RainmeterShowMeter Item11][!RainmeterHideMeter Link11][!RainmeterRedraw]

;[Item12]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem12
LeftMouseDownAction=!execute [!RainmeterShowMeter Link12][!RainmeterHideMeter Item12][!RainmeterRedraw]

;[Link12]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem12
LeftMouseUpAction=!Execute [[MeasureLink12]][!RainmeterShowMeter Item12][!RainmeterHideMeter Link12][!RainmeterRedraw]

;[Item13]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem13
LeftMouseDownAction=!execute [!RainmeterShowMeter Link13][!RainmeterHideMeter Item13][!RainmeterRedraw]

;[Link13]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem13
LeftMouseUpAction=!Execute [[MeasureLink13]][!RainmeterShowMeter Item13][!RainmeterHideMeter Link13][!RainmeterRedraw]

;[Item14]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem14
LeftMouseDownAction=!execute [!RainmeterShowMeter Link14][!RainmeterHideMeter Item14][!RainmeterRedraw]

;[Link14]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem14
LeftMouseUpAction=!Execute [[MeasureLink14]][!RainmeterShowMeter Item14][!RainmeterHideMeter Link14][!RainmeterRedraw]

;[Item15]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem15
LeftMouseDownAction=!execute [!RainmeterShowMeter Link15][!RainmeterHideMeter Item15][!RainmeterRedraw]

;[Link15]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem15
LeftMouseUpAction=!Execute [[MeasureLink15]][!RainmeterShowMeter Item15][!RainmeterHideMeter Link15][!RainmeterRedraw]

;[Item16]
Meter=STRING
MeterStyle=StyleItem
MeasureName=MeasureItem16
LeftMouseDownAction=!execute [!RainmeterShowMeter Link16][!RainmeterHideMeter Item16][!RainmeterRedraw]

;[Link16]
Meter=STRING
MeterStyle=StyleLink
MeasureName=MeasureItem16
LeftMouseUpAction=!Execute [[MeasureLink16]][!RainmeterShowMeter Item16][!RainmeterHideMeter Link16][!RainmeterRedraw]
All the Measures, Items and Links greater than 11 have been added by me.
poiru
Developer
Posts: 2873
Joined: April 17th, 2009, 12:18 pm

Re: WebParser.dll

Post by poiru »

What do you have for #RSS1#?

And have you intentionally commented out Item11, Item12, etc.? It should be [Item11], not ;[Item11]..
FancoverFive
Posts: 9
Joined: June 18th, 2010, 9:53 pm

Re: WebParser.dll

Post by FancoverFive »

poiru wrote:And have you intentionally commented out Item11, Item12, etc.? It should be [Item11], not ;[Item11]..
Ah, no! That's the problem here. Thanks for that - it's working now.