tera term的TTL脚本命令之wait

wait

等待字符串.

wait <string1> [<string2> ...]

解释

暂停直到从主机接收到一个字符串,或者直到超时发生。 最大字符串数为10。

当指定空字符串时,此命令将等待一个字符。

如果系统变量“timeout”或“mtimeout”大于零,则当超过<timeout>、<mtimeout>秒时发生超时。 如果超时小于或等于零,则永远不会发生超时。

这些命令在系统变量“result”中返回以下值之一:

含义
0超时。没有收到任何字符串。
1<string1> has received.
2<string2> has received.
n<stringn> has received. n=1..10.

例子

; The timeout limit is 30 sec.
timeout = 30

wait 'OK' 'ERROR'
; If timeout occurs, go to ":timeout".
if result=0 goto timeout
; has received, go to ":error".
If result=1 goto ok
; "ERROR" has received, go to ":error".
If result=2 goto error

; Wait a line beginning with the ">" or a line ending with the "complete.". (ASCII code of LF is 10, and CR is 13.)
wait #10'>' 'complete.'#13

; The timeout limit is 100 msec.
timeout = 0
mtimeout = 100
wait 'server response'
; Waits control codes with hex mode
setdebug 2
wait '11 0D 11 0D'
setdebug 0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值