home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Cruncher / apx-xp12.LZX / XPKatana / Arexx / DefIcons_kat.rexx next >
Encoding:
OS/2 REXX Batch file  |  1996-05-22  |  1.3 KB  |  47 lines

  1. /* ARexx script for DefIcons, to use the Katana with XPK files.*/
  2. /* Written by Eric Sauvageau - Version 0.1 (20-May-96)
  3.  
  4. /* Edit the default tool for the def_xpk.info deficon in your Envarc:sys/
  5.    drawer to launch this script.  Double-clicking on any file that is packed
  6.    with XPK will launch the Katana, and select the given file as the source.
  7.    You can also use this script for the parent class, def_filearchive.info.
  8. */
  9.  
  10. Options Results
  11. Signal On Error
  12.  
  13. XPKATANA_PATH = "prg:XPKatana/XPKatana"
  14.  
  15.  
  16. /* FIRST, we have TO actually Verify is XPKatana is running.           */
  17. If ~Show('p',"KATANA") Then Do
  18.  
  19. /* IF XPKatana is not already running, start it in iconified state. */
  20.    Address Command "run <>NIL: "||XPKATANA_PATH
  21.    Address Command "WaitForPort KATANA"
  22. End
  23.  
  24. /***** 
  25.    We need to get the shell's path, so XPKatana will be able to
  26.    locate the desired source file.
  27. *****/
  28. path = Pragma('D','')
  29. If Right(path,1) ~= ':' Then path = path||'/'
  30.  
  31.  
  32. /*** Retrieve the arguments from the command line ***/
  33. Parse Arg source
  34.  
  35.  
  36. /* Talk to XPKatana */
  37. Address 'KATANA'
  38.  
  39. /*** Tell XPKatana what is the source file. ***/
  40. SETSOURCE source ; found = result
  41.  
  42. /*****
  43.      If XPKatana can't find it, then try again, but adding the
  44.      current process's full path.
  45. *****/
  46. IF found = 'NOFILE' Then SETSOURCE path||source
  47.