vbs范本

经常需要使用secureCrt,需要输入脚本。
记录一个基本的范本

# $language = "VBScript"
# $interface = "1.0"
Sub Main
  Dim result
  Dim SendKey
  SendKey = 03 'send ctrl+c key
  result = 0
  'crt.screen.clear
  Do
    crt.Screen.Send "san" & chr(13)
'crt.Screen.Send "mac show" & chr(13) 
'crt.sleep 500
crt.Screen.Send "en" & chr(13)
crt.Screen.Send "table" & chr(13)
    crt.Screen.Send "s 4 p" & chr(13) 
crt.Screen.Send "end" & chr(13)
    crt.sleep 5000
    'result = crt.Screen.WaitForString("Menu", 1)
  Loop While result = 0
End Sub
'这里chr(13)send enter key
'chr(13)这里的chr表示组合键如chr(3) = crtl+c  chr(1) = crtl + a,---这里的chr表示crtl,里面的数组表示字母序号
'
'




你可能感兴趣的:(vbs范本)