Sorry for the rtfm, I hope there are no hard feelings. Let me try to help a bit.
Firstly, I should point out that the .xml has a problem here:
<channel name="Group 1" />
This (and the others below it) should be
">, to match the first channel name.
I have managed to solve some of your problems, but some others persist. Take the .xml file I am using:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <server name="The Killing Hand TS Server">
- <channel name="The Killing Hand (RSD)">
<player name="Rofellos (R SA)">Rofellos (R SA)</player>
<player name="Xervah (R SA)">Xervah (R SA)</player>
<player name="chan (U)">chan (U)</player>
<player name="Superman (U)">Superman (U)</player>
<player name="DummyFriend1">Superman (U)</player>
<player name="DummyFriend2">Superman (U)</player>
<player name="DummyFriend3">Superman (U)</player>
<player name="DummyFriend4">Superman (U)</player>
<player name="DummyFriend5">Superman (U)</player>
<player name="DummyFriend6">Superman (U)</player>
<player name="DummyFriend7">Superman (U)</player>
<channel name="Group 1">
<channel name="Group 2">
<channel name="Raid 1 - 10 Man">
<channel name="Raid 2 - 10 Man">
<channel name="25 Man Raid">
</channel>
<channel name="Brazil Nuts (R)">
</server>
and this is the changed code:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[Variables]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
myServer=<server name="(.*)">
myChannel=<channel name="(.*)">
mySubchannel=.*<subchannel name="(.*)">.*
myPlayer=(?(?=.*<player name=").*<player name="(.*)">)
myPlayer25=#myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer##myplayer#
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------
[TSServer]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=file://#CURRENTPATH#server.xml
RegExp="(?siU)#myserver#.*#myChannel#.*#myplayer25#.*#mychannel#"
DynamicVariables=1
UpdateRate=30
Debug=1
[TSServerName]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=1
[TSChannel1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=2
[TSChannel1Player1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=3
[TSChannel1Player2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=4
[TSChannel1Player3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=5
[TSChannel1Player4]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=6
[TSChannel1Player5]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=7
[TSChannel1Player6]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=8
[TSChannel1Player7]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=9
[TSChannel2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[TSServer]
StringIndex=28
; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------
[StyleServers]
StringAlign=CENTER
StringCase=UPPER
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
[StyleChannels]
StringAlign=Left
StringCase=UPPER
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
[StylePlayers]
StringAlign=LEFT
; Meters using styleLeftText will be left-aligned.
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------
[meterBackgroundBar]
Meter=Bitmap
MeasureName=TSServer
SolidColor=0,0,0,128
X=0
Y=0
H=35
W=243
[meterBackground]
Meter=Bitmap
MeasureName=TSServer
SolidColor=0,0,0,128
X=0
Y=0
H=300
W=243
[Servername]
Meter=String
MeterStyle=StyleServers
MeasureName=TSServerName
X=120
Y=12
H=18
AntiAlias=0
Text="%1"
[Channel1name]
Meter=String
MeterStyle=StyleChannels
MeasureName=TSChannel1
X=10
Y=40
W=300
H=18
AntiAlias=0
Text="%1"
[Channel1Player1name]
Meter=String
MeterStyle=StylePlayers
MeasureName=TSChannel1Player1
X=40
Y=60
W=130
H=18
AntiAlias=0
Text="%1"
[Channel1Player2name]
Meter=String
MeterStyle=StylePlayers
MeasureName=TSChannel1Player2
X=40
Y=80
W=130
H=18
AntiAlias=0
Text="%1"
[Channel1Player3name]
Meter=String
MeterStyle=StylePlayers
MeasureName=TSChannel1Player3
X=40
Y=100
W=130
H=18
AntiAlias=0
Text="%1"
[Channel1Player4name]
Meter=String
MeterStyle=StylePlayers
MeasureName=TSChannel1Player4
X=40
Y=120
W=130
H=18
AntiAlias=0
Text="%1"
[Channel1Player5name]
Meter=String
MeterStyle=StylePlayers
MeasureName=TSChannel1Player5
X=40
Y=140
W=10
H=18
AntiAlias=0
Text="%1"
[Channel1Player6name]
Meter=String
MeterStyle=StylePlayers
MeasureName=TSChannel1Player6
X=r
Y=20r
W=10
H=18
AntiAlias=0
Text="%1"
[Channel1Player7name]
Meter=String
MeterStyle=StylePlayers
MeasureName=TSChannel1Player7
X=r
Y=20r
W=10
H=18
AntiAlias=0
Text="%1"
[Channel2name]
Meter=String
MeterStyle=StyleChannels
MeasureName=TSChannel2
X=10
Y=20r
W=300
H=18
AntiAlias=0
Text="%1"
I used a "look ahead" expression, as others have suggested, and managed to make the parser not break, regardless of how many (if any at all) players are at the first channel. In the code above, I have changed the webparser's URL to the server.xml I have posted above. Try removing <player name> entries, to see if the skin works.
Now, the problem that occurs with so many stringIndexes (if we are talking about 25 players in each channel) is that Webparser doesn't accect so many indexes. I don't know if there is any other way the matching of 25 expressions could be done, so that it only "takes" stringIndexes when it needs them. But if the above is the only way to do it, then I suggest having different skins for each channel. Then, everything should work out.
I hope Regex Guru JSMorley reads this, to give a hand if my expressions are way messier than they could. :P