It is currently April 26th, 2024, 3:15 am

WebParser and Variables

Get help with creating, editing & fixing problems with skins
User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

WebParser and Variables

Post by Dave_W »

Hello chaps,

What I'm trying to achieve is a skin which shows the division standings in the NFL - but I only want to show one division at a time, and to change what's shown by clicking on the skin. I've found a page on ESPN that works, parsed it correctly (thank you RainRegExp!) and have a skin that displays the first league from that page (happens to be the NFC East). So far, so good.

Here's where it gets funky. To display the NFC East I use measures calling string indices 1-21 (seems like a lot, but the page shows team name, wins, losses and draws as individual entries). To display the next division, I will need to use 22-42 - and so on, with there being eight sets in total. Here are my thoughts (in order of desirability):

1) What I'd like to do is define a variable (say "League") which would be the first number in that range (i.e. 1, 22 and so on). I'd then define 21 other variables which would be TopTeamName=#League#+2 etc., then my WebParser measures would use those variables in the StringIndex= statement. Somewhere else in the skin I'd then have an action that calls RainmeterSetVariable, set #League# to a different number (probably by way of a second variable and a Calc measure, to make it loop back to 1 after eight clicks) and everything flows through from that.

Having been reading around this idea, I don't think it works. Reason 1 - the manual says that WebParser can't use Dynamic Variables, which is what the RainmeterSetVariable command needs, right? It doesn't make any difference that the variable I'm setting isn't actually the one that WebParser is reading - it's changing while the skin is running, therefore it's a dynamic variable, therefore WebParser can't use it. Right? Reason 2 - Alex's post in this thread says that if you define a variable by reference to another variable, the latter (say #TopTeamName# in my example above) will only ever take the initial value of the former (#League#). So even if #League# changes from 1 to 22, #TopTeamName# always stays at 3. Is all of this right? If it is, is there some workaround/clever way I haven't spotted to achieve this? Because it seems to me to be the neatest way.


2) If I can't do it as a set of 22 measures with varying StringIndices, I guess I have to do it by show/hide skins. The easiest way to do that, to my mind, would be if I can still define the 22 variables - then just save the same .ini eight times in the same folder (with different titles) and all I have to change in each skin is the #LEAGUE# variable. Then I can set up the skin to show/hide the relevant variants as needed (although if I go this route I'll probably make eight buttons, one for each variant, rather than cycling).

From the thread I've referred to above, this SHOULD work shouldn't it? Even though it's defined by reference to another variable, this isn't a dynamic variable (therefore WebParser should recognise it) and none of the variables will change so it's okay that they're fixed with the first value. I've tried this route, though, and I can't make it work - when I put in the [variables] section TopTeamName=(#League# + 1) and then in the relevant measure StringIndex=#LeagueName#, it fails and I just get nonsense as an output. What's going on? It doesn't make sense to me.


3) If I can't do that either, then I guess I just need to hardcode it (i.e. make one skin with eight sets of 22 measures and meters), then use enable, disable and the group bit to make it all work. I think I can do it, but (a) it's a bit brute-force, and (b) ...yknow, 350-odd measures/meters. I'm bound to make mistakes, and I'd never really be able to go back and edit the thing because of all the knock-on changes!

Hope this is all clear - code from current skin is below, in case that helps (I've commented out the lines where I'm trying to do (2), so you can see my syntax). Any help gratefully received!

Code: Select all

[Variables]
@include=#SKINSPATH#London\Shared\Variables.inc
League=1
;TopTeamName=( #League# + 2 )

[Feed]
Measure=Plugin
Plugin=WebParser.dll
Url=http://espn.go.com/nfl/standings
RegExp="(?siU)<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*"
UpdateRate=600

[LeagueTitle1]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=#League#

[Link1]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=2
Substitute="/_/":"http://espn.go.com/nfl/team/_/"

[Team1]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
;StringIndex=#TopTeamName#
StringIndex=3

[Won1]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=4

[Lost1]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=5

[Tied1]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=6

[Link2]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=7
Substitute="/_/":"http://espn.go.com/nfl/team/_/"

[Team2]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=8

[Won2]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=9

[Lost2]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=10

[Tied2]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=11

[Link3]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=12
Substitute="/_/":"http://espn.go.com/nfl/team/_/"

[Team3]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=13

[Won3]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=14

[Lost3]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=15

[Tied3]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=16

[Link4]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=17
Substitute="/_/":"http://espn.go.com/nfl/team/_/"

[Team4]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=18

[Won4]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=19

[Lost4]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=20

[Tied4]
Measure=Plugin
Plugin=WebParser.dll
Url=[Feed]
StringIndex=21

[Title]
Meter=STRING
MeterStyle=SideTitleStyle
Text="NFL"
MiddleMouseDownAction=!execute [http://espn.go.com/nfl/standings]

[League]
Meter=STRING
MeterStyle=SideSubStyle
Measurename=LeagueTitle1

[TitleBorder]
Meter=IMAGE
MeterStyle=HoriStyle
y=32

[TopTwo]
Meter=STRING
MeterStyle=SideInfoStyle
Clipstring=0
Measurename=Team1
Measurename2=Won1
Measurename3=Lost1
Measurename4=Tied1
Measurename5=Team2
Measurename6=Won2
Measurename7=Lost2
Measurename8=Tied2
Text=1) %1:  %2 - %3 - %4#CRLF#2) %5:  %6 - %7 - %8
MiddleMouseDownAction=!Execute [Link1]

[BottomTwo]
Meter=STRING
MeterStyle=SideInfoStyle
Clipstring=0
Measurename=Team3
Measurename2=Won3
Measurename3=Lost3
Measurename4=Tied3
Measurename5=Team4
Measurename6=Won4
Measurename7=Lost4
Measurename8=Tied4
Text=3) %1:  %2 - %3 - %4#CRLF#4) %5:  %6 - %7 - %8
MiddleMouseDownAction=!Execute [Link1]
y=30r

[LeagueBorder1]
Meter=IMAGE
MeterStyle=HoriDetailStyle
y=29r
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: WebParser and Variables

Post by jsmorley »

I didn't go through this carefully, but there is one thing you should remember up front. You can't use dynamic variables in any WebParser (actually any plugin) measure. So you can never set any of the values in a WebParser measure to #VariableName# and change the variable elsewhere with !RainmeterSetVariable.

The only way around this is to use !RainmeterWriteKeyValue to change a measure setting, (by either changing something in [Variables] or directly in the measure) followed by a !RainmeterRefresh of the skin to make it read the new value.
User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

Re: WebParser and Variables

Post by Dave_W »

Okay - that was helpful, thanks. I knew (or had concluded, but was seeking confirmation) that you couldn't do it with SetVariable. I didn't know that it could be done with WriteKeyValue, though, so that's really helpful and sort of confirms that what I want to do should be possible - at least in theory.

Have started working on it now...already run into the limit on returns from WebParser, which is one issue, but I think I've got a workaround. Suspect that the next issue will be a limit on the number of !bangs you can fire with one !execute command, if such a thing exists, as I have probaby twenty that need to fire at one point (I think).
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: WebParser and Variables

Post by dragonmage »

I've never heard of a limit for the number of !Bangs that can be fired at once. You should look into the new Groups functionality, it might help simplify some things for you.
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: WebParser and Variables

Post by ~Faradey~ »

I'm pretty sure there is no limit, becouse before new "groups functionality" my button skin had at least hundred of bangs to show and hide meters, but there is one thing what i cant solve - this is size of the skin...(( First version .ini file has 364 kb size, and it causes to load skin about 5-9 sec :shock: ...this is realy annoying! Latest ver. has 256 kb, now it loads a bit faster (3-5sec). So, make sure you don't have a lot of text in skin, if you planing to put into there many things:)
User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

Re: WebParser and Variables

Post by Dave_W »

Ack! So close, but can't quite finish it.

Here's what I've got:

Code: Select all

[Variables]
@include=#SKINSPATH#London\Shared\Variables.inc
Division=1
NTopTN=3
NTopTW=4
NTopTL=5
NTopTT=6
NSecTN=8
NSecTW=9
NSecTL=10
NSecTT=11
NThiTN=13
NThiTW=14
NThiTL=15
NThiTT=16
NFouTN=18
NFouTW=19
NFouTL=20
NFouTT=21


;SWITCHING DIVISIONS

[NextLeague]
Measure=Calc
Formula=(#Division#+21)

[NextTopTN]
Measure=Calc
Formula=#NTopTN#+21

[NextTopTW]
Measure=Calc
Formula=#NTopTW#+21

[NextTopTL]
Measure=Calc
Formula=#NTopTL#+21

[NextTopTT]
Measure=Calc
Formula=#NTopTT#+21

[NextSecTN]
Measure=Calc
Formula=#NSecTN#+21

[NextSecTW]
Measure=Calc
Formula=#NSecTW#+21

[NextSecTL]
Measure=Calc
Formula=#NSecTL#+21

[NextSecTT]
Measure=Calc
Formula=#NSecTT#+21

[NextThiTN]
Measure=Calc
Formula=#NThiTN#+21

[NextThiTW]
Measure=Calc
Formula=#NThiTW#+21

[NextThiTL]
Measure=Calc
Formula=#NThiTL#+21

[NextThiTT]
Measure=Calc
Formula=#NThiTT#+21

[NextFouTN]
Measure=Calc
Formula=#NFouTN#+21

[NextFouTW]
Measure=Calc
Formula=#NFouTW#+21

[NextFouTL]
Measure=Calc
Formula=#NFouTL#+21

[NextFouTT]
Measure=Calc
Formula=#NFouTT#+21

;CYCLING

[ResetCount]
Measure=Calc
Formula=#Division#
IfAboveValue=64
IfAboveAction=!Execute [!RainmeterWriteKeyValue Variables Division 1][!RainMeterWriteKeyValue Variables NTopTN 3][!RainMeterWriteKeyValue Variables NTopTW 4][!RainMeterWriteKeyValue Variables NTopTL 5][!RainMeterWriteKeyValue Variables NTopTT 6][!RainMeterWriteKeyValue Variables NSecTN 8][!RainmeterWriteKeyValue Variables NSecTW 9][!RainMeterWriteKeyValue Variables NSecTL 10][!RainMeterWriteKeyValue Variables NSecTT 11][!RainMeterWriteKeyValue Variables NThiTN 13][!RainMeterWriteKeyValue Variables NThiTW 14][!RainMeterWriteKeyValue Variables NThiTL 15][!RainMeterWriteKeyValue Variables NThiTT 16][!RainMeterWriteKeyValue Variables NFouTN 18][!RainMeterWriteKeyValue Variables NFouTW 19][!RainMeterWriteKeyValue Variables NFouTL 20][!RainMeterWriteKeyValue Variables NFouTT 21][!RainmeterRefresh]


;RSS PARSING - NFC

[NFCFeed]
Measure=Plugin
Plugin=WebParser.dll
Url=http://espn.go.com/nfl/standings
RegExp="(?siU)<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*"
UpdateRate=43200
Disabled=1
Group=NFCMeasures

[NFCLeagueTitle1]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#Division#
Disabled=1
Group=NFCMeasures

[NFCTeam1]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NTopTN#
Disabled=1
Group=NFCMeasures

[NFCWon1]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NTopTW#
Disabled=1
Group=NFCMeasures

[NFCLost1]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NTopTL#
Disabled=1
Group=NFCMeasures

[NFCTied1]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NTopTT#
Disabled=1
Group=NFCMeasures

[NFCTeam2]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NSecTN#
Disabled=1
Group=NFCMeasures

[NFCWon2]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NSecTW#
Disabled=1
Group=NFCMeasures

[NFCLost2]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NSecTL#
Disabled=1
Group=NFCMeasures

[NFCTied2]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NSecTT#
Disabled=1
Group=NFCMeasures

[NFCTeam3]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NThiTN#
Disabled=1
Group=NFCMeasures

[NFCWon3]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NThiTW#
Disabled=1
Group=NFCMeasures

[NFCLost3]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NThiTL#
Disabled=1
Group=NFCMeasures

[NFCTied3]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NThiTT#
Disabled=1
Group=NFCMeasures

[NFCTeam4]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NFouTN#
Disabled=1
Group=NFCMeasures

[NFCWon4]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NFouTW#
Disabled=1
Group=NFCMeasures

[NFCLost4]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NFouTL#
Disabled=1
Group=NFCMeasures

[NFCTied4]
Measure=Plugin
Plugin=WebParser.dll
Url=[NFCFeed]
StringIndex=#NFouTT#
Disabled=1
Group=NFCMeasures


;RSS PARSING - AFC

[AFCFeed]
Measure=Plugin
Plugin=WebParser.dll
Url=http://espn.go.com/nfl/standings
RegExp="(?siU)<td align="left">AFC EAST</t(.*)>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<td align="left">(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*<a href="http://espn.go.com/nfl/team(.*)".*>(.*)</a>.*<td>(.*)</td>.*<td>(.*)</td>.*<td>(.*)</td>.*"
UpdateRate=43200
Group=AFCMeasures

[AFCLeagueTitle1]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#Division#
Substitute="d":"AFC EAST"
Group=AFCMeasures

[AFCTeam1]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NTopTN#
Group=AFCMeasures

[AFCWon1]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NTopTW#
Group=AFCMeasures

[AFCLost1]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NTopTL#
Group=AFCMeasures

[AFCTied1]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NTopTT#
Group=AFCMeasures

[AFCTeam2]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NSecTN#
Group=AFCMeasures

[AFCWon2]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NSecTW#
Group=AFCMeasures

[AFCLost2]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NSecTL#
Group=AFCMeasures

[AFCTied2]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NSecTT#
Group=AFCMeasures

[AFCTeam3]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NThiTN#
Group=AFCMeasures

[AFCWon3]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NThiTW#
Group=AFCMeasures

[AFCLost3]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NThiTL#
Group=AFCMeasures

[AFCTied3]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NThiTT#
Group=AFCMeasures

[AFCTeam4]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NFouTN#
Group=AFCMeasures

[AFCWon4]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NFouTW#
Group=AFCMeasures

[AFCLost4]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NFouTL#
Group=AFCMeasures

[AFCTied4]
Measure=Plugin
Plugin=WebParser.dll
Url=[AFCFeed]
StringIndex=#NFouTT#
Group=AFCMeasures



;METERS

[Title]
Meter=STRING
MeterStyle=SideTitleStyle
Text="NFL"
MiddleMouseDownAction=!Execute [!RainmeterToggleMeterGroup AFCMeters][!RainmeterToggleMeterGroup NFCMeters][!RainmeterToggleMeasureGroup AFCMeasures][!RainmeterToggleMeasureGroup NFCMeasures]

[NFCLeague]
Meter=STRING
MeterStyle=SideSubStyle
y=15
Measurename=NFCLeagueTitle1
MiddleMouseDownAction=!Execute [!RainMeterWriteKeyValue Variables Division [NextLeague]][!RainMeterWriteKeyValue Variables NTopTN [NextTopTN]][!RainMeterWriteKeyValue Variables NTopTW [NextTopTW]][!RainMeterWriteKeyValue Variables NTopTL [NextTopTL]][!RainMeterWriteKeyValue Variables NTopTT [NextTopTT]][!RainMeterWriteKeyValue Variables NSecTN [NextSecTN]][!RainMeterWriteKeyValue Variables NSecTW [NextSecTW]][!RainMeterWriteKeyValue Variables NSecTL [NextSecTL]][!RainMeterWriteKeyValue Variables NSecTT [NextSecTT]][!RainMeterWriteKeyValue Variables NThiTN [NextThiTN]][!RainMeterWriteKeyValue Variables NThiTW [NextThiTW]][!RainMeterWriteKeyValue Variables NThiTL [NextThiTL]][!RainMeterWriteKeyValue Variables NThiTT [NextThiTT]][!RainMeterWriteKeyValue Variables NFouTN [NextFouTN]][!RainMeterWriteKeyValue Variables NFouTW [NextFouTW]][!RainMeterWriteKeyValue Variables NFouTL [NextFouTL]][!RainMeterWriteKeyValue Variables NFouTT [NextFouTT]][!RainmeterRefresh]
DynamicVariables=1
Hidden=1
Group=NFCMeters

[AFCLeague]
Meter=STRING
MeterStyle=SideSubStyle
y=15
Measurename=AFCLeagueTitle1
MiddleMouseDownAction=!Execute [!RainMeterWriteKeyValue Variables Division [NextLeague]][!RainMeterWriteKeyValue Variables NTopTN [NextTopTN]][!RainMeterWriteKeyValue Variables NTopTW [NextTopTW]][!RainMeterWriteKeyValue Variables NTopTL [NextTopTL]][!RainMeterWriteKeyValue Variables NTopTT [NextTopTT]][!RainMeterWriteKeyValue Variables NSecTN [NextSecTN]][!RainMeterWriteKeyValue Variables NSecTW [NextSecTW]][!RainMeterWriteKeyValue Variables NSecTL [NextSecTL]][!RainMeterWriteKeyValue Variables NSecTT [NextSecTT]][!RainMeterWriteKeyValue Variables NThiTN [NextThiTN]][!RainMeterWriteKeyValue Variables NThiTW [NextThiTW]][!RainMeterWriteKeyValue Variables NThiTL [NextThiTL]][!RainMeterWriteKeyValue Variables NThiTT [NextThiTT]][!RainMeterWriteKeyValue Variables NFouTN [NextFouTN]][!RainMeterWriteKeyValue Variables NFouTW [NextFouTW]][!RainMeterWriteKeyValue Variables NFouTL [NextFouTL]][!RainMeterWriteKeyValue Variables NFouTT [NextFouTT]][!RainmeterRefresh]
DynamicVariables=1
Hidden=0
Group=AFCMeters

[TitleBorder]
Meter=IMAGE
MeterStyle=HoriStyle
y=32

[NFCTopTwo]
Meter=STRING
MeterStyle=SideInfoStyle
Clipstring=0
Measurename=NFCTeam1
Measurename2=NFCWon1
Measurename3=NFCLost1
Measurename4=NFCTied1
Measurename5=NFCTeam2
Measurename6=NFCWon2
Measurename7=NFCLost2
Measurename8=NFCTied2
Text=1) %1:  %2 - %3 - %4#CRLF#2) %5:  %6 - %7 - %8
DynamicVariables=1
Hidden=1
Group=NFCMeters

[AFCTopTwo]
Meter=STRING
MeterStyle=SideInfoStyle
Clipstring=0
Measurename=AFCTeam1
Measurename2=AFCWon1
Measurename3=AFCLost1
Measurename4=AFCTied1
Measurename5=AFCTeam2
Measurename6=AFCWon2
Measurename7=AFCLost2
Measurename8=AFCTied2
Text=1) %1:  %2 - %3 - %4#CRLF#2) %5:  %6 - %7 - %8
DynamicVariables=1
Hidden=0
Group=AFCMeters

[NFCBottomTwo]
Meter=STRING
MeterStyle=SideInfoStyle
Clipstring=0
Measurename=NFCTeam3
Measurename2=NFCWon3
Measurename3=NFCLost3
Measurename4=NFCTied3
Measurename5=NFCTeam4
Measurename6=NFCWon4
Measurename7=NFCLost4
Measurename8=NFCTied4
Text=3) %1:  %2 - %3 - %4#CRLF#4) %5:  %6 - %7 - %8
DynamicVariables=1
y=29r
Hidden=1
Group=NFCMeters

[AFCBottomTwo]
Meter=STRING
MeterStyle=SideInfoStyle
Clipstring=0
Measurename=AFCTeam3
Measurename2=AFCWon3
Measurename3=AFCLost3
Measurename4=AFCTied3
Measurename5=AFCTeam4
Measurename6=AFCWon4
Measurename7=AFCLost4
Measurename8=AFCTied4
Text=3) %1:  %2 - %3 - %4#CRLF#4) %5:  %6 - %7 - %8
DynamicVariables=1
y=1r
Hidden=0
Group=AFCMeters

[BottomBorder]
Meter=IMAGE
MeterStyle=HoriDetailStyle
y=32r
This gives me a title ("NFL"), a subtitle (the name of the division) and then each team in the division with their won-lost-tied record. By default it starts on the AFC East.

When I middle-click the name of the division, it moves to the next one (e.g. from the AFC East to the AFC North) - and when it gets to the final division, a middle-click cycles back round to the first. That's all using the WriteKeyValue, as suggested by JS. When I middle-click the "NFL", it jumps from the AFC to the equivalent NFC division (e.g. from the AFC East to the NFC East) and vice-versa (and enables/disables all the relevant measures). That's all using Groups, per DM's suggestion. So far so good.

Here's the remaining problem - if I middle-click the name of the division when I'm looking at an NFC division, it DOES advance but it also flips back to the AFC (e.g. a middle-click on the NFC East jumps to the AFC North not the NFC North). I figure that this is because the middle-click calls a number of !bangs which end with !RainmeterRefresh - this is equivalent to reloading the skin, if I understand the manual, and therefore it returns to what's written in the skin (which has Hidden=1 under each NFC meter).

I tried replacing the !RainmeterRefresh with !RainmeterRedraw but then a middle-click actually didn't change anything in terms of the meters (although I noticed from the skin that it DID update the variables, so the WriteKeyValue bang was being called). I suspect that this is because Redraw updates meters, but as these meters are outputting from Webparser (which doesn't use dynamic variables) an update doesn't actually change the value shown. I also tried adding the ToggleMeterGroup bangs to the end of the !execute bang called when middle-clicking an NFC division title...no dice, just behaved as normal (i.e. flipped back to the AFC).

I appreciate that I could get this done by breaking out the AFC and NFC into separate skins - I'm not all that bothered, though...this is a quirk, rather than a functionality-breaking bug, and the load/inconvenience of having two skins isn't worth it to correct it, for my purposes. If anyone can see any obvious way to fix it within one skin, though - do please let me know!