Moving a box with vwm Thread last updated on 2003-06-06 04:40:23

Posted by member 1783 on 2003-06-03 10:25:17

this is a minor problem actually, but my theme would look better if anyone could solve this. i have my vwm in a box and it is loaded if the user wants it. i have animated the appearing and dissapearing sequences like this:
*Script bang !Toggle_VWM
*Script gotoif ("%{Initialized}" = "false") Show_VWM
*Script gotoif ("%{VWMVisible}" = "true") Hide_VWM

*Script label Show_VWM
*Script exec !ReloadModule "$ModulesDir$RabidVWM.dll"
*Script exec !LsBoxCreate $ConfigDir$vwm.box
; *Script exec !pause 1000
*Script exec !ifEval ("%{Initialized}" = "true") {!LsBoxMoveBox VWM 49 -24 10 20} else {!LsBoxMoveBox VWM 49 -24}
*Script exec !varSet VWMVisible "true"
*Script goto Save_VWM

*Script label Hide_VWM
*Script exec !LsBoxMoveBox VWM 49 -0 10 20
*Script exec !LsBoxDestroy VWM
*Script exec !UnloadModule "$ModulesDir$RabidVWM.dll"
*Script exec !varSet VWMVisible "false"

*Script label Save_VWM
*Script exec !varSave VWMVisible
*Script ~bang

only one little problem: the vwm appears in the box after the box has moved to its correct position. during the movement the box is empty. i guess this is caused by vwm not loading by the time the animation starts. i could repair it by defining a pause between the loading and the animation, but the loading time depends on the user's system so here's my question: can the script be told when rabidvwm has finished loading?

Posted by member 7223 on 2003-06-03 19:18:40 link

There's something like VWMOnInit !bang...
...But why on earth do you unload it each time you want to hide it. I guess you won't save system ressources this way

Posted by member 1783 on 2003-06-04 00:25:14 link

it's for people, who don't want to use vwm. if they don't need it, why should it be loaded and consuming resources?
anyway, thnx for the tip :)

Posted by member 7223 on 2003-06-04 07:45:20 link

RabidVWM bring you so usefull commands like OnNewWindow !bang, OnTitleChange !bang, etc... and VERY usefull vars like ^@ct^, ^@wt^...

Of course, it's just my opinion; but there's so many funny things to do with RabidVWM, even if you use a 1x1 VWM and you hide it...

Posted by member 1783 on 2003-06-04 07:53:58 link

amen to that ;)
rabidcow has created a really amazing piece of code.

Posted by member 1783 on 2003-06-06 04:40:23 link

i tried out VWMOnInit, but it doesn't do anything. maybe because i load it with !ReloadModule not LoadModule and it's in a box.