화면 해상도를 얻기 위해 다음 vbs 스크립트를 찾았습니다.
하지만 결과를 텍스트 파일에 저장하고 싶습니다.
Dim HTM, wWidth, wHeight
Set HTM = CreateObject("htmlfile")
wWidth = HTM.parentWindow.screen.Width
wHeight = HTM.parentWindow.screen.Height
wscript.echo wWidth & "X" & wHeight
새 텍스트 파일로 저장하려면 필요에 따라 다음 VBScript를 사용할 수 있습니다.
Dim HTM, wWidth, wHeight
Set HTM = CreateObject("htmlfile")
wWidth = HTM.parentWindow.screen.Width
wHeight = HTM.parentWindow.screen.Height
wscript.echo wWidth & "X" & wHeight
Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile("D:\file.txt",2,true)
objFileToWrite.WriteLine("--- screen resolution start -------------------------")
objFileToWrite.WriteLine( wWidth & "X" & wHeight)
objFileToWrite.WriteLine("--- screen resolution end -------------------------")
objFileToWrite.Close
Set objFileToWrite = Nothing
기존 텍스트 파일의 끝에 텍스트를 추가하려면 쉽게로 IOMode 매개 변수를 변경할 수 있습니다 8
예를
("D:\file.txt",8,true)
이 true
매개 변수는 파일이 새로 생성되었는지 또는 false
.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다