/
클립보드 내용을 줄 단위로 터미널에 보내는 스크립트
클립보드 내용을 줄 단위로 터미널에 보내는 스크립트
다음은 클립보드의 내용을 줄 단위로 보내는 스크립트(VB 스크립트로 작성)입니다. 여러 줄로 된 명령어의 결과를 확인하고자 할 때 사용할 수 있습니다.
Sub Main xsh.Screen.Synchronous = true Dim clpData, objIE, rlines Set objIE = CreateObject("InternetExplorer.Application") objIE.Navigate("about:blank") clpData = objIE.document.parentwindow.clipboardData.GetData("text") rlines = Split(clpData, VbCrLf, -1) Dim i For i = 0 to ubound(rlines) Step 1 xsh.Screen.Send rlines(i) xsh.Session.sleep(100) xsh.Screen.WaitForString VbCr Next xsh.Screen.Synchronous = false End Sub
IE의 설정에 따라 클립보드에 대한 접근 허용 여부를 묻는 메시지가 나올 수 있습니다.
IE의 '도구 -> 인터넷 옵션 -> 보안'에서 '프로그램 클립보드 액세스 허용'을 '사용'으로 변경합니다.
적용 제품
Xshell 4.0 버전 부터
Related content
윈도우 11 24H2 버전에서 waitforstrings 함수가 작동하지 않는 문제
윈도우 11 24H2 버전에서 waitforstrings 함수가 작동하지 않는 문제
More like this
xsh.Screen
xsh.Screen
More like this
xsh.Screen
xsh.Screen
More like this
Waitforstrings function not working in Windows11 Version 24H2
Waitforstrings function not working in Windows11 Version 24H2
More like this
xsh.Session
xsh.Session
More like this
xsh.Session
xsh.Session
More like this