It is currently April 25th, 2024, 12:50 pm
Issue with StringIndex2 example
-
- Posts: 19
- Joined: August 31st, 2012, 12:10 am
Issue with StringIndex2 example
I am having an issue with the StringIndex2 example in the WeParser Related Tips. I cannot get the example to work. i copy the whole example code into notepad and save as an .ini file, and try to run it and i get nothing. i add a backgroundmode=2 to find it, i get a blank box.
-
- Developer
- Posts: 2681
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Issue with StringIndex2 example
Looks like there are a couple of errors with that code.
Try this:
-Brian
Try this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[Variables]
Item=.*<item>(.*)</item>
Sub="<![CDATA[":"","]]>":""
[MeasureSite]
Measure=Plugin
Plugin=WebParser
Url=http://feeds.gawker.com/lifehacker/full
RegExp="(?siU)<channel>.*<image>.*<title>(.*)</title>.*<link>(.*)</link>#Item##Item##Item#"
[MeasureMainTitle]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
StringIndex=1
Substitute=#Sub#
[MeasureMainLink]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
StringIndex=2
[MeasureItem1Title]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
RegExp="(?siU)<title>(.*)</title>"
StringIndex=3
StringIndex2=1
Substitute=#Sub#
[MeasureItem1Link]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
RegExp="(?siU)<link>(.*)</link>"
StringIndex=3
StringIndex2=1
[MeasureItem2Title]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
RegExp="(?siU)<title>(.*)</title>"
StringIndex=4
StringIndex2=1
Substitute=#Sub#
[MeasureItem2Link]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
RegExp="(?siU)<link>(.*)</link>"
StringIndex=4
StringIndex2=1
[MeasureItem3Title]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
RegExp="(?siU)<title>(.*)</title>"
StringIndex=5
StringIndex2=1
Substitute=#Sub#
[MeasureItem3Link]
Measure=Plugin
Plugin=WebParser
Url=[MeasureSite]
RegExp="(?siU)<link>(.*)</link>"
StringIndex=5
StringIndex2=1
[MeterMainTitle]
Meter=String
MeasureName=MeasureMainTitle
X=0
Y=0
FontSize=13
FontColor=255,255,255,255
SolidColor=0,0,0,1
StringStyle=Bold
Antialias=1
LeftMouseUpAction=["[MeasureMainLink]"]
[MeterItem1Title]
Meter=String
MeasureName=MeasureItem1Title
X=0
Y=5R
W=300
H=35
ClipString=1
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
Antialias=1
LeftMouseUpAction=["[MeasureItem1Link]"]
[MeterItem2Title]
Meter=String
MeasureName=MeasureItem2Title
X=0
Y=5R
W=300
H=35
ClipString=1
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
Antialias=1
LeftMouseUpAction=["[MeasureItem2Link]"]
[MeterItem3Title]
Meter=String
MeasureName=MeasureItem3Title
X=0
Y=5R
W=300
H=35
ClipString=1
FontSize=11
FontColor=255,255,255,255
SolidColor=0,0,0,1
Antialias=1
LeftMouseUpAction=["[MeasureItem3Link]"]
-
- Developer
- Posts: 2681
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Issue with StringIndex2 example
I updated the StringIndex2 Tips and Tricks page.
Note: The code was actually correct on that page, the problem was that "<" and ">" were not escaped correctly, so browsers thought they were actually HTML tags.
-Brian
Note: The code was actually correct on that page, the problem was that "<" and ">" were not escaped correctly, so browsers thought they were actually HTML tags.
-Brian
-
- Posts: 19
- Joined: August 31st, 2012, 12:10 am
Re: Issue with StringIndex2 example
Ok it works now, thank you for the help. i felt there may have been an error on my part since it was a full example.