/
VBS 예제: 스크롤백 버퍼 지우고 일련의 명령 결과를 파일에 기록
VBS 예제: 스크롤백 버퍼 지우고 일련의 명령 결과를 파일에 기록
Sub Main
xsh.Screen.Synchronous = true
' Clear current screen and the terminal's scrollback buffer
xsh.Screen.Send "reset"
xsh.Screen.Send VbCr
xsh.Session.Sleep 100
' start logging
xsh.Session.LogFilePath = "d:\result\1.txt"
xsh.Session.StartLog
xsh.Session.Sleep 100
' Send commands to the server
xsh.Screen.Send "ls -l"&vbcr
xsh.Session.Sleep 100
xsh.Screen.Send "cd ~"&vbcr
xsh.Screen.Send "ls -l"&vbcr
xsh.Screen.Synchronous = false
' Stop logging
xsh.Session.StopLog
End sub
Related content
VBS sample: Clear the scrollback buffer and write the result of serial commands to a file
VBS sample: Clear the scrollback buffer and write the result of serial commands to a file
More like this
VB스크립트를 이용한 다중 세션 오픈 [1]
VB스크립트를 이용한 다중 세션 오픈 [1]
More like this
Run a script which will execute the commands in a file and save seperate log for each command [1]
Run a script which will execute the commands in a file and save seperate log for each command [1]
More like this
일정 주기로 특정 문자열을 보내는 스크립트
일정 주기로 특정 문자열을 보내는 스크립트
More like this
vb script 버그 (5.0 1179) [6]
vb script 버그 (5.0 1179) [6]
More like this
vb script 사용 관련 질문 [1]
vb script 사용 관련 질문 [1]
More like this