You are not yet quite getting how WebParser works.
In the RegExp, you will see things like this
(.*) that in effect means "capture everything into a StringIndex". So you search for text up to the point you want to start capturing data, then put (.*) and text that tells it to stop capturing when you hit it.
So
<FirstName>(.*)</FirstName>.*<LastName>(.*)</LastName> would put "Jeffrey" in StringIndex 1 and "Morley" in StringIndex 2, assuming that the actual HTML was
<FirstName>Jeffrey</FirstName> <LastName>Morley</LastName>.
YOU don't decide or force what data is in what StringIndex. The RegExp does that, putting one (.*) "capture" in each, and in the order they are found. A Regular Expression reads the source HTML from top to bottom, left to right, like a book.
The measure will fail if you try to re-order things by changing the RegExp to an order that isn't top to bottom, left to right, like a book. Likewise, child measures need to use the correct StringIndex number that is returned by the RegExp in the parent measure. You can't and don't need to re-order things by putting measures in a particular order, or by trying to force them to use a StringIndex that is assigned for something else.
The code below will work.
I put the measures in the same order as the information is being captured in the RegExp, however make no mistake: I didn't need to. The order of the measures is of no significance other than making it more logical to read.
I changed the StringIndex numbers on the measures to correspond to what is in the RegExp. Those (.*) things, right? Just go through the RegExp and count them...
I think it would be good if you went through this little tutorial, and created the skin it works you through. Once the basics of WebParser are clear to you, you will find you can do a lot of cool things with it. But I sense we are not making progress the way we are going.
http://rainmeter.net/cms/Tips-WebParserPrimer
Code: Select all
[Rainmeter]
Update=1000
[Variables]
Get=(?(?=.*<title>).*<title>(.*)</title>.*<modified>(.*)T(.*)Z.*<author>.*<name>(.*)</name>)
Url=https://xxxxx:xxxxx@gmail.google.com/gmail/feed/atom
[RSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=#Url#
RegExp="(?siU)Gmail - Inbox for (.*)@.*<entry>#Get##Get##Get#"
[MeasureMailCount]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=#Url#
RegExp="(?siU)<fullcount>(.*)</fullcount>"
UpdateRate=100
StringIndex=1
[MeasureAccount]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=1
[MeasureItem1]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=2
DecodeCharacterReference=1
[MeasureDate1]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=3
[MeasureTime1]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=4
[MeasureAuthor1]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=5
[MeasureItem2]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=6
DecodeCharacterReference=1
[MeasureDate2]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=7
[MeasureTime2]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=8
[MeasureAuthor2]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=9
[MeasureItem3]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=10
DecodeCharacterReference=1
[MeasureDate3]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=11
[MeasureTime3]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=12
[MeasureAuthor3]
Measure=Plugin
Plugin=WebParser
Url=[RSS]
StringIndex=13
[MeterMailIcon]
Meter=IMAGE
X=2
Y=2
ImageName=mailB.png
ToolTipTitle=[MeasureAccount] @ Gmail ([MeasureMailCount]) da leggere
ToolTipText=[MeasureDate1] [MeasureTime1] [MeasureAuthor1] ~ [MeasureItem1]#CRLF#[MeasureDate2] [MeasureTime2] [MeasureAuthor2] ~ [MeasureItem2]#CRLF#[MeasureDate3] [MeasureTime3] [MeasureAuthor3] ~ [MeasureItem3]
ToolTipIcon=#SKINSPATH#\Posta\64.ico
;ToolTipWidth=300
DynamicVariables=1
LeftMouseUpAction=!Execute ["https://mail.google.com/mail/"]