home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gbmv2.zip / gbmwpobj.cmd < prev    next >
OS/2 REXX Batch file  |  1995-07-31  |  2KB  |  41 lines

  1. /* REXX exec to make the Workplace Shell objects for GBM */
  2.  
  3. Call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  4. Call sysloadfuncs
  5.  
  6. If Pos('\GBM',Translate(Value('PATH',,'OS2ENVIRONMENT'))) > 0 Then Do
  7.   drive = Substr(Translate(Value('PATH',,'OS2ENVIRONMENT')),Pos('\GBM',Translate(Value('PATH',,'OS2ENVIRONMENT')))-2,2)
  8.   Say "Found "drive"\GBM on the path"
  9.   fullpath = drive||'\GBM'
  10. End
  11. Else Do
  12.   Say "Please type full path to where GBM installed (eg: D:\GBM)"
  13.   Parse Upper Pull fullpath
  14. End
  15.  
  16. rc = SysFileTree(fullpath, 'file', 'D')
  17. If file.0 <> 0 Then Do
  18.   assoc = '*.BMP,*.VGA,*.BGA,*.RLE,*.DIB,*.RL4,*.RL8,*.GIF,*.PCX,*.TIF,*.TGA,*.VST,*.AFI,*.IFF,*.LBM,*.VID,*.PGM,*.PPM,*.KPS,*.IAX,*.XBM,*.SPR,*.SPRITE,*.PSE,*.PSEG,*.PSEG*'
  19.   Call SysCreateObject 'WPProgram','GbmV2','<WP_DESKTOP>','EXENAME='||fullpath||'\GBMV2.EXE;PROGTYPE=PM;PARAMETERS=%*;STARTUPDIR='||fullpath||';ASSOCFILTER='||assoc,'R'
  20.   Say "Workplace Shell Object for GbmV2 created on the desktop."
  21.   Say "This has associations for all GBM file formats, including *.BMP files."
  22.   Say "This means you can just click on a bitmap file to get it displayed."
  23.   Say "However, the Icon Editor also lays multiple claims to *.BMP files."
  24.   Say "So you may get Icon Editor in preference to GBM if you click on a bitmap."
  25.   Say "I would recommend removing its claims, so that GBM is the default."
  26.   Say "If so, find the following items :-"
  27.   Say "  \OS2\ICONEDIT.EXE file (perhaps by using Drives)."
  28.   Say "  Icon Editor program reference object in OS/2 System -> Productivity."
  29.   Say "  \TOOLKT21\OS2BIN\ICONEDIT.EXE file (perhaps by using Drives)."
  30.   Say "  Icon Editor program reference object in Toolkit 2.1 -> PM Development Tools."
  31.   Say "  any other copies of ICONEDIT.EXE and program reference objects."
  32.   Say "and then remove the following from the Settings -> Association page :-"
  33.   Say "  Bitmap entry from Current types listbox."
  34.   Say "  *.BMP entry from the Current names listbox."
  35. End
  36. Else Do
  37.   Say "The directory " fullpath " does not exist"
  38. End
  39.  
  40. Return 0
  41.