这个也是一闪而过[Visual Basic] 纯文本查看 复制代码 Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("1.txt", 1) ' Open the file for reading
Do Until objTextFile.AtEndOfStream ' Loop until the end of the file
strLine = objTextFile.ReadLine ' Read a line from the file
If strLine <> "" Then ' Check if the line is not empty
' Assuming the .py files are in the same directory as the .vbs script
CreateObject("WScript.Shell").Run "python " & strLine & ".py", 1, True
End If
Loop
objTextFile.Close ' Close the file |