1#################################################### 2# 3# command - comgt script for command interaction 4# 5# Copyright (C) 2006 Paul Hardwick <paul@peck.org> 6# 7################################################### 8print "\nType command at prompt.\n" 9print "Empty input terminates.\n" 10print "#################\n" 11opengt 12set com 115200n81 13set senddelay 0.05 14waitquiet 1 0.2 15 16:loop1 17 print "Command: " 18 input $x 19 let c=len($x) 20 if c=1 goto end 21 let c=c-1 22 let $c=$left($x,c) 23 send $x 24 send "^m" 25 :loop2 26 print $a 27 get 1 "^m" $a 28 let a=len($a) 29 if a > 0 goto loop2 30 goto loop1 31:end 32print "#################\n" 33