home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / utilities / ttmanager / rexx / ttm-activettstotop.rexx next >
Encoding:
OS/2 REXX Batch file  |  1999-02-08  |  862 b   |  45 lines

  1. /* $VER: TTM-ActiveTTsToTop.rexx 1.0 (7.2.99) by J. Tierney
  2.  
  3.   TTManager Active Tooltypes To Top  v1.0
  4.   2/7/99  J. Tierney
  5.  
  6.   Purpose:  Reorders the tooltype list, putting all active tooltypes above the
  7.            inactive ones.
  8. */
  9.  
  10. OPTIONS RESULTS
  11. ADDRESS 'TTMANAGER'
  12.  
  13. 'GetTooltypeList' ttlist
  14.  
  15. /* --- Seperate enabled & disabled tooltypes. --- */
  16. onc = 0
  17. offc = 0
  18. DO i = 0 TO ttlist.count - 1
  19.   IF LEFT(ttlist.i, 1) = '(' THEN DO
  20.     offlist.offc = ttlist.i
  21.     offc = offc + 1
  22.     END
  23.   ELSE DO
  24.     onlist.onc = ttlist.i
  25.     onc = onc + 1
  26.   END
  27. END
  28.  
  29. IF (onc > 0) & (offc > 0) THEN DO
  30.   /* --- Enabled tooltypes first... --- */
  31.   crnt = 0
  32.   DO i = 0 TO onc - 1
  33.     ttlist.crnt = onlist.i
  34.     crnt = crnt + 1
  35.   END
  36.   /* --- Disabled tooltypes. --- */
  37.   DO i = 0 TO offc - 1
  38.     ttlist.crnt = offlist.i
  39.     crnt = crnt + 1
  40.   END
  41.  
  42.  'SetTooltypeList' ttlist
  43. END
  44.  
  45.