/* ** $Id: DiceHelp.ttx,v 30.0 1994/06/10 18:06:16 dice Exp $ ** ** DICEHelp help system. Script for Oxxi TurboText (tm). ** ** Rexx script modeled after version by David Joiner */ PARSE UPPER ARG COMMAND /* PROMPT */ OPTIONS RESULTS IF COMMAND = "PROMPT" THEN 'RequestStr prompt "Enter search string "' ELSE 'GETLINE' if (RC > 0) then exit searchline = RESULT IF COMMAND = "" THEN DO 'GETCURSORPOS' searchcol = word(RESULT, 4) END hostname = address() /* Source TTX window */ portname = 'DICEHELP' /* DICEHelp's port name */ tempname = 't:DICEHelp.temp' /* Temporary file for passing clips */ if ~show('p',portname) then do address COMMAND 'RUN >NIL: empfile */ ELSE 'Z' searchcol searchline /* Search for string: Z xx line */ if RC=0 then do refline = RESULT refstring = SUBWORD( refline, 2 ) address value hostname /* Back to TTX */ if WORD( refline, 1 ) = "E" then do 'SetStatusBar' refstring exit end OPENDOC NAME refstring newport = RESULT /* get the new editor's port name */ if RC > 0 then do /* if not there, then error */ 'SetStatusBar' "Error opening" refstring exit end address value newport /* Address the new window */ SETREADONLY exit end else do address value hostname 'SetStatusBar' "Error code" RC "DICEHelp failed!" end