home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1994 September
/
CICA_Shareware_for_Windows_Walnut_Creek_September_1994.iso
/
win3
/
desktop
/
sh93v100.lzh
/
CI
< prev
next >
Wrap
Text File
|
1993-09-04
|
953b
|
57 lines
FUNCTION interpret(text) {
status (text)
k = index(text, " ")
key = (k != 0)? substr(text, 1, k - 1): text;
cmd = (k != 0)? substr(text, k+1): "";
if (key == "!")
exec(cmd, 1) | stdout
else if (key == "dos") {
dos(cmd " >output");
f2c("output");
}
else if (text != "")
eval(text) | stdout
printf ("\n> ") | stdout
return (0);
}
/| input input/ {
interpret(DDEinput);
}
/| input click/ {
if (substr(DDEinput, 1, 1) == ">") {
DDEinput = substr(DDEinput, 3)
printf ("%s\n", DDEinput) | stdout
}
interpret(DDEinput)
}
BEGIN {
DDEservice = "ci " PROGwindow
ctrl(2, DDEservice, 1)
if (getmod("tty") == 0) {
inform(DDEservice,
"Starten Sie zunächst das Terminal Programm TTY.");
exit();
}
tty = "tty|stdio " PROGwindow
DDEservice "|input" | tty "!open"
stdout = tty "!print"
interpret("\"system ready\"")
}
END {
# "" | tty "!close"
}