Posted by member 12025 on 2004-08-22 16:35:12 link
Here's a quick fix I managed to work up.
; ...start of other script here
*script exec !varSet Cclass 0
*script exec !IfEval ( "%{\1}" > "38" ) !varAdd Cclass 1
*script exec !IfEval ( "%{\1}" > "43" ) !varAdd Cclass 1
*script exec !IfEval ( "%{\1}" > "65" ) !varAdd Cclass 1
*script exec !IfEval ( "%{Cclass}" "%{CclassCheck}" ) !setVWM_desks_correction %{Cclass}
*script ~bang
*script bang !setVWM_desks_correction ; \correction class: 0 (0 -1 0 0), 1 (0 0 0 0), 2 (1 0 -1 0), 3 (1 0 -2 0)...but making that variable was difficult, resulting in corrupted themevars.rc
*script exec !varSet CclassCheck %{\1}
*script exec !IfEval ( "%{\1}" = "0" ) !execute [!varSet vwmDB_l "0"][!varSet vwmDB_t "-1"][!varSet vwmDB_r "0"][!varSet vwmDB_b "0"]
*script exec !IfEval ( "%{\1}" = "1" ) !execute [!varSet vwmDB_l "0"][!varSet vwmDB_t "0"][!varSet vwmDB_r "0"][!varSet vwmDB_b "0"]
*script exec !IfEval ( "%{\1}" = "2" ) !execute [!varSet vwmDB_l "1"][!varSet vwmDB_t "0"][!varSet vwmDB_r "-1"][!varSet vwmDB_b "0"]
*script exec !IfEval ( "%{\1}" = "3" ) !execute [!varSet vwmDB_l "1"][!varSet vwmDB_t "0"][!varSet vwmDB_r "-2"][!varSet vwmDB_b "0"]
; Had issues with !IfEq, so used !IfEval
; Below gets rid of the VWM and its label, and rebuilds both.
*script exec !vwmhide
*script exec !labelhide vwmBox
*script exec !labeldestroy vwmBox
*script exec !varsaveall
*script exec !reload
*script exec !netreloadmodule rabidvwm-1.1.1
*script exec !labelcreate vwmbox
*script ~bang
*script exec !varSet Cclass 0
*script exec !IfEval ( "%{\1}" > "38" ) !varAdd Cclass 1
*script exec !IfEval ( "%{\1}" > "43" ) !varAdd Cclass 1
*script exec !IfEval ( "%{\1}" > "65" ) !varAdd Cclass 1
*script exec !IfEval ( "%{Cclass}" "%{CclassCheck}" ) !setVWM_desks_correction %{Cclass}
*script ~bang
*script bang !setVWM_desks_correction ; \correction class: 0 (0 -1 0 0), 1 (0 0 0 0), 2 (1 0 -1 0), 3 (1 0 -2 0)...but making that variable was difficult, resulting in corrupted themevars.rc
*script exec !varSet CclassCheck %{\1}
*script exec !IfEval ( "%{\1}" = "0" ) !execute [!varSet vwmDB_l "0"][!varSet vwmDB_t "-1"][!varSet vwmDB_r "0"][!varSet vwmDB_b "0"]
*script exec !IfEval ( "%{\1}" = "1" ) !execute [!varSet vwmDB_l "0"][!varSet vwmDB_t "0"][!varSet vwmDB_r "0"][!varSet vwmDB_b "0"]
*script exec !IfEval ( "%{\1}" = "2" ) !execute [!varSet vwmDB_l "1"][!varSet vwmDB_t "0"][!varSet vwmDB_r "-1"][!varSet vwmDB_b "0"]
*script exec !IfEval ( "%{\1}" = "3" ) !execute [!varSet vwmDB_l "1"][!varSet vwmDB_t "0"][!varSet vwmDB_r "-2"][!varSet vwmDB_b "0"]
; Had issues with !IfEq, so used !IfEval
; Below gets rid of the VWM and its label, and rebuilds both.
*script exec !vwmhide
*script exec !labelhide vwmBox
*script exec !labeldestroy vwmBox
*script exec !varsaveall
*script exec !reload
*script exec !netreloadmodule rabidvwm-1.1.1
*script exec !labelcreate vwmbox
*script ~bang
vwmDeskBorder $vwmDB_l$ $vwmDB_t$ $vwmDB_r$ $vwmDB_b$