home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1994 September
/
CICA_Shareware_for_Windows_Walnut_Creek_September_1994.iso
/
win3
/
desktop
/
sh93v100.lzh
/
INTERACT
< prev
next >
Wrap
Text File
|
1993-09-05
|
661b
|
41 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 == "!") {
status(cmd)
exec(cmd, 1)
}
else if (key == "dos") {
status(cmd)
dos(cmd " >output");
f2c("output")
}
else if (text == "bye")
exit()
else if (text != "")
eval(text) |: status()
return (0);
}
/shift F9 "kommando ausführen"/ {
if ((x = input("interactive", "Kommando:", "", lastcmd)) != "\z") {
interpret(lastcmd = x);
}
}
BEGIN {
if (WINtext == "")
ctrl(2, "interactive")
if (WINkey + 0 == 0)
ctrl(3, 120)
}