/* Toggles the Right Tray Open or Closed Bind this Macro to a Hotkey for ease of use. 2017 Joseph Drust - www.JosephDrust.com Feel free to use this code in other Macros or ZScripts! Thanks to Marcus Burgess for the continuing ZScripting help over the years :) */ ///////////////////////////////////////// // User Changable Options /////////////// ///////////////////////////////////////// ///////////////////////////////////////// ///////////////////////////////////////// [RoutineDef,RightTrayToggle, [If,[IHPos,1001,1]<[IHPos,Unlock,1], //Tray is Open keep using IClicks till it Closes [Loop,5, [If,[IHPos,1001,1]<[IHPos,Unlock,1], [IClick,1001] , [LoopExit] ] ] , //Tray is Closed Keep using IClicks till it Opens [Loop,5, [If,[IHPos,1001,1]>[IHPos,Unlock,1], [IClick,1001] , [LoopExit] ] ] ] ]//Routine RightTrayToggle [IButton,???,"Toggles the Right Tray Open or Closed", [IShowActions,0] [IConfig,4.8] //[IFreeze, [RoutineCall,RightTrayToggle] //] ,,1/2,,,]