home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / utilities / ttmanager / rexx / ttm-dtoolreplace.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1998-11-21  |  1.2 KB  |  53 lines

  1. /* $VER: TTM-DToolReplace.rexx 1.0 (16.11.98) by J. Tierney
  2.  
  3.   TTManager Default Tool Replace  v1.0
  4.   11/16/98  J. Tierney <jtierney@cyberlink-inc.com>
  5.  
  6.   Purpose:  Replaces the default tool with a user's preferred tool.
  7.  
  8.   Usage:  TTM-DToolReplace.rexx
  9.  
  10.  
  11.   Expanding:
  12.     dtool.<n>.find = The name of a tool (without any path info.) to get rid of.
  13.     dtool.<n>.replace = The tool you prefer to use.
  14. */
  15.  
  16. dtool.0.find = 'More'                     /* Name of tool to match. */
  17. dtool.0.replace = 'SYS:Utilities/xMore'   /* Replacement tool.      */
  18.  
  19. dtool.1.find = 'PPMore'
  20. dtool.1.replace = 'SYS:Utilities/xMore'
  21.  
  22. dtool.2.find = 'AmigaGuide'
  23. dtool.2.replace = 'SYS:Utilities/Multiview'
  24.  
  25. /*
  26. -- Copy and fill in the following lines to expand TTM-DToolReplace.rexx. --
  27.  
  28. dtool..find = ''
  29. dtool..replace = ''
  30. */
  31.  
  32.  
  33.  
  34. /* --- Program Begins Here --- */
  35. OPTIONS RESULTS
  36. ADDRESS 'TTMANAGER'
  37.  
  38. 'GetDefaultTool'
  39. crnttool = result
  40. IF result = '' THEN EXIT
  41.  
  42. x = LASTPOS('/', crnttool)
  43. IF x = 0 THEN x = LASTPOS(':', crnttool)
  44. IF x ~= 0 THEN crnttool = SUBSTR(crnttool, x + 1)     /* Strip path. */
  45.  
  46. DO i = 0 UNTIL dtool.i.find = 'DTOOL.' || i || '.find'
  47.   IF dtool.i.find = crnttool THEN DO
  48.     'SetToolType' dtool.i.replace
  49.     EXIT 0
  50.   END
  51. END
  52.  
  53.