/****************************************************************************** * * * FWKatanaUNPACK.rexx V1.0 * * * * ARexx Interface Script for Final Writer, using XPKatana * * * * This script decompress and load files compressed using XPK * * library, and then load them into Final Writer * * * * IMPORTANT: YOU SHOULD CLEAR ALL OTHER FILES OPENED IN FINAL * * WRITER, BECAUSE IF YOU TRY TO SAVE THEM LATER USING * * FWKatanaPACK.rexx SCRIPT, YOU WOULD END UP WITH THE * * WRONG FILE SAVED... THIS IS BECAUSE IT SAVES ONLY THE * * FILE THAT IS IN THE FIRST WINDOW OPENED... "FINALW.1" * * * * * Uses ARexx Port "KATANA" * * * * Written by Rémi Létourneau & Eric Sauvageau, December 20th 1995 * * * ******************************************************************************/ OPTIONS RESULTS SIGNAL ON ERROR /* Adjust this as needed */ XPKATANA_PATH = "SYS:Utilities/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 ! */ start = 1 ADDRESS COMMAND "run <>NIL: "||XPKATANA_PATH||" ICONIFY" ADDRESS COMMAND "WaitForPort KATANA" END /* speak to XPKatana and get the File Requester */ ADDRESS 'KATANA' SETSOURCE "?" ; Filename = RESULT If Filename = "NOFILE" Then EXIT /* No source selected */ /* Set XPKatana to "No progress window". */ SETFLAGS NOPROGRESS 1 /* Pack the file, keeping the same filename (unless */ /* "Handle Suffix" was previously enabled */ UNPACK "T:FWXPK_TMP" /* Quitting XPKatana */ If start = 1 Then QUIT /* Speak to the Final Writer Port that started this script and save */ /* the file with the filename that we got from XPKatana's Requester */ ADDRESS "FINALW.1" OPEN "T:FWXPK_TMP"