回复 1# mhgd
不是吧?这个逻辑挺简单的呀,我写了一下$i = @HOUR
For $i =0 To 23
If 7 <= $i And $i <= 20 Then
ConsoleWrite("When $i is " & $i & " It's Ture" & @CRLF)
Else
ConsoleWrite("When $i is " & $i & " It's False" & @CRLF)
EndIf
Next
结果如下:
>"D:\Tools\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\prj\Au3\test.au3"
When $i is 0 It's False
When $i is 1 It's False
When $i is 2 It's False
When $i is 3 It's False
When $i is 4 It's False
When $i is 5 It's False
When $i is 6 It's False
When $i is 7 It's Ture
When $i is 8 It's Ture
When $i is 9 It's Ture
When $i is 10 It's Ture
When $i is 11 It's Ture
When $i is 12 It's Ture
When $i is 13 It's Ture
When $i is 14 It's Ture
When $i is 15 It's Ture
When $i is 16 It's Ture
When $i is 17 It's Ture
When $i is 18 It's Ture
When $i is 19 It's Ture
When $i is 20 It's Ture
When $i is 21 It's False
When $i is 22 It's False
When $i is 23 It's False
>Exit code: 0 Time: 0.536 |