VBScriptのIf文で、時刻を変数で判定できません。
リテラル値(いわゆるベタ書き)なら判定できます。なぜでしょうか?
[sample.vbs]
VBScript
1Dim starting_time 2starting_time = "10:15:00" 3 4Do 5 6 If Time = starting_time then ' 動作しません 7 msgbox "A" 8 WScript.Quit 9 end if 10 11 If Time = "10:15:00" then ' 動作します 12 msgbox "B" 13 WScript.Quit 14 End if 15 16Loop
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。