It is currently May 3rd, 2024, 3:57 pm
Get help with creating, editing & fixing problems with skins
WhoGotTheChunk
Posts: 5 Joined: January 14th, 2012, 12:06 am
Post
by WhoGotTheChunk » May 9th, 2012, 3:57 pm
This may just be me being stupid but I dunno. I've struggled with this for a few hours now, googling and reading up on everything I can think of. Basically.
I Parse a server and get 10 results back, I just want to know how to get the 10th one and show it on a simple string meter. I have managed to get the first one back using this code:
Code: Select all
[MeasureName]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=6000
Url=#URL#
RegExp="(?siU)<td class="server-name">(.*)</td>"
StringIndex=1
[MeterName]
Meter=String
MeasureName=MeasureName
X=50
Y=50
W=400
H=400
FontSize=20
FontColor=255,255,255,255
AntiAlias=1
But I would like the 10th one for example. Here are the results from RainRegExp:
If there is any other information that is needed I can provide it.
-Chunk
Brian
Developer
Posts: 2689 Joined: November 24th, 2011, 1:42 am
Location: Utah
Post
by Brian » May 9th, 2012, 5:18 pm
Regular Expressions in RainRegExp work a little different than in Rainmeter.
In Rainmeter, you need to specify the exact amount of StringIndex's.
So doing
RegExp="(?siU)<td class="server-name">(.*)</td>" will only give you
one StringIndex. You need to add more (.*)'s to get more StringIndex's.
Try this:
Code: Select all
[Variables]
Get=".*<td class="server-name">(.*)</td>"
[MeasureWeb]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=6000
Url=#URL#
RegExp="(?siU)#GET##GET##GET##GET##GET##GET##GET##GET##GET##GET#"
[MeasureName1]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=1
[MeasureName2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=2
[MeasureName3]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=3
[MeasureName4]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=4
[MeasureName5]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=5
[MeasureName6]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=6
[MeasureName7]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=7
[MeasureName8]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=8
[MeasureName9]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=9
[MeasureName10]
Measure=Plugin
Plugin=WebParser
Url=[MeasureWeb]
StringIndex=10
[MeterName]
Meter=String
MeasureName=MeasureName1
X=50
Y=50
W=400
H=400
FontSize=20
FontColor=255,255,255,255
AntiAlias=1
As you can see, you need to have a separate "Child" webparser measure for each StringIndex.
Then if you want display the 10th StringIndex, you make a string meter with the MeasureName equal to MeasureName10 (or whatever you want to call your measure containing StringIndex=10).
I hope that makes a little sense.
Here is some more information about Webparser.
-Brian
Brian
Developer
Posts: 2689 Joined: November 24th, 2011, 1:42 am
Location: Utah
Post
by Brian » May 9th, 2012, 5:56 pm
This example works better than mine. After reading the original post, I realized that WhoGotTheChunk is asking to get the 10th server name.
-Brian
WhoGotTheChunk
Posts: 5 Joined: January 14th, 2012, 12:06 am
Post
by WhoGotTheChunk » May 9th, 2012, 6:52 pm
Thank you very much. This helps me out MILLIONS! 1 internet to you both
WhoGotTheChunk
Posts: 5 Joined: January 14th, 2012, 12:06 am
Post
by WhoGotTheChunk » May 10th, 2012, 1:25 am
I am now getting this in the log:
Code: Select all
WebParser.dll: (1649) The operation timed out (ErrorCode=12002)
I checked the whole WebParser test and I'm getting the green light. I'm just not having any luck with this whole script
. Tempted to give up and just visit the site everytime lol.
Now running it after restarting I'm getting this in the log:
Code: Select all
WebParser.dll: [MeasureServerName] Matching error! (-8)
WebParser.dll: (1649) The connection with the server was reset (ErrorCode=12031)