Baidu is so arrogant that it always eats the first line of space, resulting in no code indentation. You can use the following methods to solve the problem:
1. Switch to the classic version of Baidu Post Bar
2. Use the following script to replace the tabs and spaces in the Code with the unicode encoding format.
Copy codeThe Code is as follows: 'cscript // nologo C: \ test. vbs C: \ test. bat
Set objFSO = CreateObject ("Scripting. FileSystemObject ")
Set objFile = objFSO. OpenTextFile (WScript. Arguments (0), 1, True)
StrAll = objFile. ReadAll ()
StrTab = Replace (strAll, chr (9 ),"")
StrBlank = Replace (strTab, "", "" & "160 ;")
Call SetClipboardText (strBlank)
Sub SetClipboardText (strText)
Set objIE = CreateObject ("InternetExplorer. Application ")
ObjIE. Navigate ("about: blank ")
ObjIE. Document. ParentWindow. ClipboardData. SetData "text", strText
ObjIE. Quit
End Sub
Usage: 'cscript // nologo C: \ test. vbs C: \ test. bat