Posted by member 37809 on 2003-07-10 00:04:01 link
Yes, I'm an mzscript fiend ;0
Combining pika's suggestion with my excessiveness, and also with disclaimer of mzscript version differences:
Again have everything initially hidden. Then have bangs:
!hide_vwmsys, !show_vwmsys, etc, for each of the items in:
*script var queue vwmsys:tray:amp:cmdline
Then try the following, which allows for two-way queue advancing. Letting the data structure do all the work isn't nearly as fun :p
If you wanted you could combine some more. The first script I suggested is more self-contained than this one and allows for you to select any one view by setting the variable newview to the index and calling !queue_refresh
Combining pika's suggestion with my excessiveness, and also with disclaimer of mzscript version differences:
Again have everything initially hidden. Then have bangs:
!hide_vwmsys, !show_vwmsys, etc, for each of the items in:
*script var queue vwmsys:tray:amp:cmdline
Then try the following, which allows for two-way queue advancing. Letting the data structure do all the work isn't nearly as fun :p
*script bang !queue_prev
*script exec !hide_%{queue:}
*script exec !varset working %{queue}:end
*script exec !varset notlast ""
*script label loop
*script exec !varset last %{working:}
*script gotoif ("%{working:_}" = "end") done
*script exec !varset notlast %{notlast}:%{last}
*script exec !varset working %{working:_}
*script goto loop
*script label done
*script exec !varset queue %{last}%{notlast}
*script exec !show_%{queue:}
*script exec !varremove working
*script exec !varremove notlast
*script exec !varremove last
*script ~bang
*script bang !queue_next
*script exec !hide_%{queue:}
*script exec !varset queue %{queue:_}:%{queue:}
*script exec !show_%{queue:}
*script ~bang
*script start !exec |show_%{queue:}
*script exec !hide_%{queue:}
*script exec !varset working %{queue}:end
*script exec !varset notlast ""
*script label loop
*script exec !varset last %{working:}
*script gotoif ("%{working:_}" = "end") done
*script exec !varset notlast %{notlast}:%{last}
*script exec !varset working %{working:_}
*script goto loop
*script label done
*script exec !varset queue %{last}%{notlast}
*script exec !show_%{queue:}
*script exec !varremove working
*script exec !varremove notlast
*script exec !varremove last
*script ~bang
*script bang !queue_next
*script exec !hide_%{queue:}
*script exec !varset queue %{queue:_}:%{queue:}
*script exec !show_%{queue:}
*script ~bang
*script start !exec |show_%{queue:}
If you wanted you could combine some more. The first script I suggested is more self-contained than this one and allows for you to select any one view by setting the variable newview to the index and calling !queue_refresh