我会尝试一次写一个字符,看看它是否在某个特定的地方停止,使用 cscript.exe 而不是 wscript.exe 运行它:
Set objExportFile = objFso.OpenTextFile(exportFileLocation, 8, True, -1)
sCharacterData = ""
sCharacterData = objHead.responseText 'write the response to a variable
wscript.echo("Character Length of sCharacterData: " & Len(sCharacterData))
vCharNumber = 0 'set the index
Do Until vCharNumber > Len(sCharacterData) 'loop through all the characters
sCurrentChar = Mid(sCharacterData, vCharNumber, 1)
wscript.write("CharNumber: " & vCharNumber & " Char: " & sCurrentChar)
objExportFile.Write(sCurrentChar) 'write 1 character
vCharNumber = vCharNumber + 1 'increment index
Loop
objExportFile.Close