Posted by member 37809 on 2003-08-04 11:58:53 link
You may not be able to use *[Tray]On (alone) for showing scrolling arrows when needed, since this does not provide greater-than or less-than detection. I don't know of any use for these commands except for if they are applied for reasonably finite operations, in which case you could possibly not need another module (mzscript).
The best way to do this sort of thing is to use [Tray]OnAdd and [Tray]OnDel with mzscript'd bangs to increase or decrease an integer variable and then check that variable and execute the appropriate actions.
The best way to do this sort of thing is to use [Tray]OnAdd and [Tray]OnDel with mzscript'd bangs to increase or decrease an integer variable and then check that variable and execute the appropriate actions.
VTrayOnAdd !execute [!varadd trayicons 1][!tray_check]
VTrayOnDel !execute [!varadd trayicons -1][!tray_check]
*script bang !tray_check
*script gotoif ("%{trayicons}" > "6") showarrows
*script exec !ReplaceThisWithHowYouHideTheArrows
*script exit
*script label showarrows
*script exec !ReplaceThisWithHowYouShowTheArrows
*script ~bang
VTrayOnDel !execute [!varadd trayicons -1][!tray_check]
*script bang !tray_check
*script gotoif ("%{trayicons}" > "6") showarrows
*script exec !ReplaceThisWithHowYouHideTheArrows
*script exit
*script label showarrows
*script exec !ReplaceThisWithHowYouShowTheArrows
*script ~bang