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 >
Text File  |  1993-09-05  |  661b  |  41 lines

  1.  
  2. FUNCTION interpret(text) {
  3.     status (text)
  4.  
  5.     k = index(text, " ")
  6.     key = (k != 0)? substr(text, 1, k - 1): text;
  7.     cmd = (k != 0)? substr(text, k+1): "";
  8.     if (key == "!") {
  9.         status(cmd)
  10.         exec(cmd, 1)
  11.         }
  12.     else if (key == "dos") {
  13.         status(cmd)
  14.         dos(cmd " >output");
  15.         f2c("output")
  16.         }
  17.     else if (text == "bye")
  18.         exit()
  19.     else if (text != "")
  20.         eval(text) |: status()
  21.  
  22.     return (0);
  23.     }
  24.  
  25.  
  26. /shift F9 "kommando ausführen"/ {
  27.     if ((x = input("interactive", "Kommando:", "", lastcmd)) != "\z") {
  28.         interpret(lastcmd = x);
  29.         }
  30.     }
  31.  
  32.  
  33.  
  34. BEGIN {
  35.     if (WINtext == "")
  36.         ctrl(2, "interactive")
  37.  
  38.     if (WINkey + 0 == 0)
  39.         ctrl(3, 120)
  40.     }
  41.