Posted by member 2112 on 2004-01-06 06:25:02
Simplicity uses 4 shortcuts to create VWM indicator and is driven by a mzscript. I believe it works without a fault. I'm putting a VWM indicator in my new theme and believe that the same effect should be acheivable with less lines of code and without mzscript. But I have been unsuccessful so far and I don't know what is wrong.
My shortcut are in an LSBox and look like this...
The code I was originally using to hide and show the appropriate shortcut was this...
This failed to hide the previously active shortcut when you changed from the related VWM desk. So if you changed from desk 2 to 3, sc2 (shortcut 2) would still be active. If you then changed to either desk 1 or 4, sc2 would become inactive but sc3 remain active. I don't see why.
So I then tried this code...
Sc1 is active when the theme first start and if you change from desk 1 it remains active until you change back to desk 1 and it becomes inactive. Otherwise all shortcuts remain inactive regardless of which desk you are on.
I've gone over these bits of code countless times and it seems to me that in theory they should work. But they don't. Does anyone know why? I would like to avoid using mzscript.
My shortcut are in an LSBox and look like this...
*shortcut "" $vwm_start$ 3 desk.png deska.png .none #1h !VWMDesk 1
*shortcut "" $vwm_start+13$ 3 desk.png deska.png .none #2 !VWMDesk 2
*shortcut "" $vwm_start+13*2$ 3 desk.png deska.png .none #3 !VWMDesk 3
*shortcut "" $vwm_start+13*3$ 3 desk.png deska.png .none #4 !VWMDesk 4
*shortcut "" $vwm_start$ 3 deska.png .none .none #5 !none
*shortcut "" $vwm_start+13$ 3 deska.png .none .none #6h !none
*shortcut "" $vwm_start+13*2$ 3 deska.png .none .none #7h !none
*shortcut "" $vwm_start+13*3$ 3 deska.png .none .none #8h !none
*shortcut "" $vwm_start+13$ 3 desk.png deska.png .none #2 !VWMDesk 2
*shortcut "" $vwm_start+13*2$ 3 desk.png deska.png .none #3 !VWMDesk 3
*shortcut "" $vwm_start+13*3$ 3 desk.png deska.png .none #4 !VWMDesk 4
*shortcut "" $vwm_start$ 3 deska.png .none .none #5 !none
*shortcut "" $vwm_start+13$ 3 deska.png .none .none #6h !none
*shortcut "" $vwm_start+13*2$ 3 deska.png .none .none #7h !none
*shortcut "" $vwm_start+13*3$ 3 deska.png .none .none #8h !none
The code I was originally using to hide and show the appropriate shortcut was this...
VWMOnSwitchTo !execute [!LsBoxGroupHide 5][!LsBoxGroupHide 6 ][!LsBoxGroupHide 7 ][!LsBoxGroupHide 8][!LsBoxGroupShow 1][!LsBoxGroupShow 2][!LsBoxGroupShow 3][!LsBoxGroupShow 4][!LsBoxGroupHide ^@dc^][!LsBoxGroupShow ^@#d^4+^@dc^^@#d^]
This failed to hide the previously active shortcut when you changed from the related VWM desk. So if you changed from desk 2 to 3, sc2 (shortcut 2) would still be active. If you then changed to either desk 1 or 4, sc2 would become inactive but sc3 remain active. I don't see why.
So I then tried this code...
VWMOnSwitchFrom !execute [LsBoxGroupHide ^@#d^4+^@dc^^@#d^][!LsBoxGroupShow ^@dc^]
VWMOnSwitchTo !execute [LsBoxGroupHide ^@dc^][!LsBoxGroupShow ^@#d^4+^@dc^^@#d^]
VWMOnSwitchTo !execute [LsBoxGroupHide ^@dc^][!LsBoxGroupShow ^@#d^4+^@dc^^@#d^]
Sc1 is active when the theme first start and if you change from desk 1 it remains active until you change back to desk 1 and it becomes inactive. Otherwise all shortcuts remain inactive regardless of which desk you are on.
I've gone over these bits of code countless times and it seems to me that in theory they should work. But they don't. Does anyone know why? I would like to avoid using mzscript.