home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Global Amiga Experience
/
globalamigaexperience.iso
/
text_dtp
/
editor
/
turbotext
/
rexx
/
execblk.ttx
< prev
next >
Wrap
Text File
|
1995-07-10
|
945b
|
50 lines
/** $VER: ExecBlk.ttx 2.0 (22.2.94)
**
** Execute the currently selected block, or the whole document if no block is
** selected, as an AmigaDOS script file.
**/
OPTIONS RESULTS
SetDisplayLock ON
SetInputLock ON
TaskID = Pragma('ID')
tempname = "T:ExecBlk-" || TaskID
GetBlkInfo
PARSE VAR RESULT blockActive .
/* Determine if we are executing a block or the whole file */
IF blockActive = ON THEN DO
GetBlk lines.
IF Open(file,tempname,WRITE) THEN DO
DO i = 1 TO lines.0 BY 1
WriteCh(file,lines.i)
END
WriteLn(file,"")
Close(file)
DROP lines.
END
END; ELSE DO
GetFilePath
path = RESULT
SaveFileAs QUIET NOICON NOBACKUP tempname
SetFilePath path
END
ADDRESS COMMAND "C:Execute " || tempname
IF ~Show(L,'rexxsupport.library') THEN DO
AddLib('rexxsupport.library',0,-30)
END;
Delete(tempname)
SetDisplayLock OFF
SetInputLock OFF