Code: Select all
buttoncommand=!Execute [!ToggleMeterGroup CisChanged "#CURRENTCONFIG#"][!HideMeterGroup b "#CURRENTCONFIG#"][!ShowMeterGroup b[DesktopCount] "#CURRENTCONFIG#"]
Code: Select all
VDOnDeactivate=!Execute [!ToggleMeterGroup CisChanged "#CURRENTCONFIG#"][!HideMeterGroup b "#CURRENTCONFIG#"][!ShowMeterGroup b[DesktopCount] "#CURRENTCONFIG#"]
The first line is in a button meter, and it works.
The two lines are IDENTICAL past the equal sign
The Second Line is in this plugin measure
Here is the complete measure:
Code: Select all
[VDMActive]
Measure=Plugin
Plugin=VirtualDesktops
VDManager=Dexpot
VDMeasureType=VDMActive
VDOnActivate=!Execute [!ToggleMeterGroup CisChanged "#CURRENTCONFIG#"][!HideMeterGroup b "#CURRENTCONFIG#"][!ShowMeterGroup b[DesktopCount] "#CURRENTCONFIG#"]
The problem seems to be that DesktopCount is wrong, it is 0 but it should be between 1 and 20
The code that sets DesktopCount is as follows:
Code: Select all
[DesktopCount]
Measure=Plugin
Plugin=VirtualDesktops
VDManager=Dexpot
VDMeasureType=DesktopCount
VDOnChange=!Execute [!ToggleMeterGroup CisChanged "#CURRENTCONFIG#"][!ShowMeterGroup b[DesktopCount] "#CURRENTCONFIG#"]
The group I am trying to show is a row of buttons for each Virtual desktop. The number of buttons depends on how many virtual desktops are configured in Dexpot. IE: if there are 6 virtual desktop then the bang [!ShowMeterGroup b[DesktopCount] "#CURRENTCONFIG#"] should resolve to [!ShowMeterGroup b6 dexpot] and buttons 1 through 6 should display.
Here is the code for the buttons:
Code: Select all
[b1]
Meter=button
MeasureName=SwitchDesktop
ButtonImage=#CURRENTPATH#images\1.png
x=24
y=22
buttoncommand=!Execute [!CommandMeasure "SwitchDesktop" "1"][!hidegroup Clock][!ShowGroup Clock1][!hidegroup Art][!ShowGroup Art1]
group=b | b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8 | b9 | b10
hidden=0
[b2]
Meter=button
MeasureName=SwitchDesktop
ButtonImage=#CURRENTPATH#images\2.png
x=24r
y=22
buttoncommand=!Execute [!CommandMeasure "SwitchDesktop" "2"][!hidegroup Clock][!ShowGroup Clock2][!hidegroup Art][!ShowGroup Art2]
group=b | b2 | b3 | b4 | b5 | b6 | b7 | b8 | b9 | b10
hidden=0
.
.
.
.
.
.
[b9]
Meter=button
MeasureName=SwitchDesktop
ButtonImage=#CURRENTPATH#images\9.png
x=24r
y=22
buttoncommand=!Execute [!CommandMeasure "SwitchDesktop" "9"]
group=b | b9 | b10
hidden=0
[b10]
Meter=button
MeasureName=SwitchDesktop
ButtonImage=#CURRENTPATH#images\10.png
x=24r
y=22
buttoncommand=!Execute [!CommandMeasure "SwitchDesktop" "10"]
group=b | b10
hidden=0
Here are my two best guesses as to what is causing my problem.
(1) The VDOnActivate=!bang executes the bang when you start to activae Dexpot, not when Dexpot is ACTIVATED. That means that any other values the skin gets from Dexpot, such as DesktopCount, CurrentDesktop or DesktopName return 0 or a blank string because Dexopt is not really active when the bang ie executed, it is still in the process of starting.
(2) The Bang is executed after Dexpot has started, but the value for DesktopCount has not been updated by Rainmeter. Unfortunately all my attempts to code arround that problem have failed, I guess I flunked Rainmeter 101. [/list]