home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / mincom15.zip / scriptdemo < prev    next >
Text File  |  1993-04-22  |  496b  |  24 lines

  1. # A little demonstration of the possibilities of "runscript".
  2. # This script can be executed by typing: "runscript scriptdemo".
  3.  
  4.   goto main
  5. left:
  6.   print "\010 \010\010*\c"
  7.   return
  8. right:
  9.   print "\010 *\c"
  10.   return
  11. main:
  12.   ! stty -echo cbreak
  13.   verbose off
  14.   print Demo! press 'q' to move left, 'w' to move right, 'ESC' to stop.
  15.   print "                   *\c"
  16.   expect {
  17.       "q"    gosub left
  18.       "w"    gosub right
  19.       "\033"    break
  20.   }
  21.   print \nEnd of demonstration.
  22.   ! stty -cbreak echo
  23.   sleep 1
  24.