home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 10
/
aminetcdnumber101996.iso
/
PStream
/
Rexx
/
CMDshell.tsrx
< prev
Wrap
Text File
|
1993-11-08
|
2KB
|
62 lines
/* CMDshell.tsrx */
/* Copyright 1993 Soft-Logik Publishing Corporation */
/* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
/* $VER: 2.0 */
/* Purpose: Opens a console window and feeds typed commands directly
to TypeSmith */
/* written by Gary Knight 3/24/93 */
options results
options failat 100
open('console', 'CON:0/11/640/100/TypeSmith/SCREEN TypeSmith', 'RW')
writeln('console', 'Enter commands, "Q" to exit.')
address TYPESMITH
/* loop until user exits */
do forever
/* get command string from user */
writech('console','CMD> ')
cmd=upper(readln('console'))
select
/* time to quit? */
when (upper(cmd) = "Q") then do
leave
end
/* need some help? */
when (cmd = "?") then do
writeln('console', 'Enter "Q" to exit.')
end
/* do nothing on empty lines */
when (cmd = "") then do
nop
end
/* whatsinaline */
otherwise do
/* execute the command string */
cmd
/* if ok show the result, if any */
if (RC = 0) then do
if result ~= "RESULT" then writeln('console', result)
end
else do
writeln('console', '*** Error');
end
end
end
end
exit(0)