home *** CD-ROM | disk | FTP | other *** search
- /* ARexx script for DefIcons, to use the Katana with XPK files.*/
- /* Written by Eric Sauvageau - Version 0.1 (20-May-96)
-
- /* Edit the default tool for the def_xpk.info deficon in your Envarc:sys/
- drawer to launch this script. Double-clicking on any file that is packed
- with XPK will launch the Katana, and select the given file as the source.
- You can also use this script for the parent class, def_filearchive.info.
- */
-
- Options Results
- Signal On Error
-
- XPKATANA_PATH = "prg:XPKatana/XPKatana"
-
-
- /* FIRST, we have TO actually Verify is XPKatana is running. */
- If ~Show('p',"KATANA") Then Do
-
- /* IF XPKatana is not already running, start it in iconified state. */
- Address Command "run <>NIL: "||XPKATANA_PATH
- Address Command "WaitForPort KATANA"
- End
-
- /*****
- We need to get the shell's path, so XPKatana will be able to
- locate the desired source file.
- *****/
- path = Pragma('D','')
- If Right(path,1) ~= ':' Then path = path||'/'
-
-
- /*** Retrieve the arguments from the command line ***/
- Parse Arg source
-
-
- /* Talk to XPKatana */
- Address 'KATANA'
-
- /*** Tell XPKatana what is the source file. ***/
- SETSOURCE source ; found = result
-
- /*****
- If XPKatana can't find it, then try again, but adding the
- current process's full path.
- *****/
- IF found = 'NOFILE' Then SETSOURCE path||source
-