secureCRT无限循环脚本

产品在测试过程中发现反复切换ip地址,会有小概率画面卡停或者图像变灰,构建securecrt ip自动切换按钮脚本如下,但是该按钮脚本无法无限循环测试。

/app/spi_gpio_decoder write 0x28 0x01000000\r
/app/spi_gpio_decoder write 0x2c 0xc0a80115\r
/app/spi_gpio_decoder write 0x2a 0xc0a8010a\r
/app/spi_gpio_decoder write 0x28 0x01000800\r
usleep 300000 \r
/app/spi_gpio_decoder write 0x28 0x01000000\r
/app/spi_gpio_decoder write 0x2c 0xc0a80116\r
/app/spi_gpio_decoder write 0x2a 0xc0a8010b\r
/app/spi_gpio_decoder write 0x28 0x01000800\r
usleep 300000 \r
 

构建无限循环的vbs脚本如下,可先通过脚本录制操作,获取相关命令的vbs脚本,再加入while语句,注意文本要保存为ansi格式,否则utf-8下语句可能识别异常。保存下面文本直接securecrt,脚本,执行,即可。

 

#$language = "VBScript"
#$interface = "1.0"

Sub main
 While 1
 crt.Screen.Send "/app/spi_gpio_decoder write 0x28 0x01000000" & chr(13)
 crt.Screen.Send "/app/spi_gpio_decoder write 0x2c 0xc0a80115" & chr(13)
 crt.Screen.Send "/app/spi_gpio_decoder write 0x2a 0xc0a8010a" & chr(13)
 crt.Screen.Send "/app/spi_gpio_decoder write 0x28 0x01000800" & chr(13)
 crt.Sleep(300) & chr(13)
 crt.Screen.Send "/app/spi_gpio_decoder write 0x28 0x01000000" & chr(13)
 crt.Screen.Send "/app/spi_gpio_decoder write 0x2c 0xc0a80116" & chr(13)
 crt.Screen.Send "/app/spi_gpio_decoder write 0x2a 0xc0a8010b" & chr(13)
 crt.Screen.Send "/app/spi_gpio_decoder write 0x28 0x01000800" & chr(13)
 crt.Sleep(300) & chr(13)
 WEnd
End Sub

 

 

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值