Posted by member 37809 on 2003-07-09 18:41:29 link

This may best be done with some sort of scripting, personally preferably with mzscript (stable or not).

Use a state variable that keeps track of the current view. To change views, you can request a new view and hide the old view. (I feel this way is smoother than hiding old and then showing new).

This simply (not the best?) designed script I present (for mzscript v0.9 etc) uses one numerical variable that holds the index of the queue's views. You could do something like the following (which is Updated: tested and working, fairly understandable and pluggable w/ your text)

*script bang !queue_prev
*script exec !varset newview %{curview}
*script exec !varadd newview -1
*script exec !queue_refresh
*script ~bang

*script bang !queue_next
*script exec !varset newview %{curview}
*script exec !varadd newview 1
*script exec !queue_refresh
*script ~bang

*script bang !queue_refresh
; wrap view
*script exec !ifeval ("%{newview}" < "1") '|varset newview 4'
*script exec !ifeval ("%{newview}" > "4") '|varset newview 1'

*script gotoif ("%{newview}" = "2") show2
*script gotoif ("%{newview}" = "3") show3
*script gotoif ("%{newview}" = "4") show4
*script goto show1 ; case to catch all

*script label hide
*script gotoif ("%{newview}" = "%{curview}") done
*script gotoif ("%{curview}" = "1") hide1
*script gotoif ("%{curview}" = "2") hide2
*script gotoif ("%{curview}" = "3") hide3
*script gotoif ("%{curview}" = "4") hide4

*script label save
*script exec !varset curview %{newview}
*script exec !varsave curview
*script label done
*script exit

; vwm, system status
*script label show1
*script exec !bangsToShowEtc
*script goto hide
*script label hide1
*script exec !bangsToHideEtc
*script goto save

; system tray
*script label show2
*script exec !bangsToShowEtc
*script goto hide
*script label hide2
*script exec !bangsToHideEtc
*script goto save

;etc
*script label show3
*script exec !bangsToShowEtc
*script goto hide
*script label hide3
*script exec !bangsToHideEtc
*script goto save

;etc
*script label show4
*script exec !bangsToShowEtc
*script goto hide
*script label hide4
*script exec !bangsToHideEtc
*script goto save

*script ~bang

*script start !execute [!exec |varset newview %{curview}][!queue_refresh]


Have curview as a variable in a file, and of course add and modify the code as necessary. It is assumed that you have everything hidden initially.