0
我有一個簡單的腳本,我不想在最後關閉(退出)。我希望它再次從頭開始。VB腳本簡單循環問題
Dim FJobName, objShell, FRevent, FReventNo, FPrevJobName
FJobName=InputBox ("Job Name","Plates Complete","ACT")
result=Msgbox(FJobName ,vbYesNo, "New Job?")
If result = vbYes Then
FRevent="raiseevent SetJobStatus_r3 " & FJobName & " InCart New -host 194.128.255.22 -port 61235"
Set objShell = WScript.CreateObject ("WScript.shell")
objShell.run FRevent
Else
If result = vbNo Then
result=Msgbox(FJobName ,vbYesNo, "Repeat Job?")
If result = vbYes Then
FPrevJobName=InputBox ("Previous Job Name?","Plates Complete","")
result=Msgbox(FPrevJobName ,vbYesNo, "Is this correct?")
If result = vbYes Then
FReventNo="raiseevent SetJobStatus_r3 " & FJobName & " InCart Repeat " & FPrevJobName & " -host 194.128.255.22 -port 61235"
Set objShell = WScript.CreateObject ("WScript.shell")
objShell.run FReventNo
End If
End If
End If
End If
我已經格式化你的代碼的代碼,下一次選擇該自己做,按鈕可以編輯窗口中的菜單欄上找到,並期待這樣的:'{}'爲了保證及時回答,您可能想花時間縮進。 – Fionnuala