Code: Select all
[Variables]
ButtonAction0=!ShowMeter
ButtonAction1=!HideMeter
ButtonActionNum=0
Bangs with the section variables work a bit different. When you made a bang with section variables like this one:
LeftMouseUpAction=[[#ButtonAction[#ButtonActionNum]] Meter2]
you expected it be equal to this:
LeftMouseUpAction=[!ShowMeter Meter2]
but it does not work like this in such case. In fact, it is applied
as if there are already brackets in your variable, so in your case it transforms the bang to this format:
LeftMouseUpAction=[[!ShowMeter] Meter2]
so the proper way would be having it this way :
Code: Select all
[Variables]
ButtonActionNum=0
ButtonAction0=!ShowMeter Meter2
ButtonAction1=!HideMeter Meter2
[Meter1]
LeftMouseUpAction=[#ButtonAction[#ButtonActionNum]]
and it is going to work as
LeftMouseUpAction=[!ShowMeter Meter2].
And for your case you can put it this way:
Code: Select all
[Variables]
ButtonActionNum=0
N=2
ButtonAction0=!ShowMeter Meter#N#
ButtonAction1=!HideMeter Meter#N#
[Meter1]
LeftMouseUpAction=[#ButtonAction[#ButtonActionNum]]
; you will need to have something like this:
LeftMouseUpAction=[!SetVariable N 2][#ButtonAction[#ButtonActionNum]]