私はいくつかの質問があります:引用符をサポートするためにどのようにスクリプトの最適化
を。 set data "(" C:\ text.txt "、True)"を選択します。
以下の最適化プロセスのコードを修正してください。
このファイルを続行する前に、txtファイルが作成されるまで保持または一時停止する方法。最初の質問に関しては
set A_mark {"}
set B_mark {(}
set C_mark {)}
set D_mark {,}
set path [pwd]
set pathFile [file join $path text.txt]
set strgdt [join [list "Set objFile = objFSO.CreateTextFile" "$B_mark$A_mark$pathFile$A_mark$D_mark True$C_mark"] ""]
#HERE THE FIRST QUESTIONS
#I would like to write the format string example like this: Set objFile = objFSO.CreateTextFile("C:\text.txt", True)
set vbs [list \
{On Error Resume Next} \
{Const wbemFlagReturnImmediately = &h10} \
{Const wbemFlagForwardOnly = &h20} \
{Dim objFSO, objFile} \
{Set objFSO = CreateObject("Scripting.FileSystemObject")} \
"$strgdt" \ ;#The variable from above
#so on..
]
#Write the vbsFile
set oFile [open "vscr.vbs" w]
#Run the vbs file then create a txt file
set res [exec {cmd.exe /c [file join $path vbscrpting.vbs]}]
#HERE THE SECOND QUESTIONS
#How to make sure the file already created and if the txt file still on processing then wait until finish create it.
#Open txt file
set txtFile [open "text.txt" r]