如:(個人修改以 autoit 腳本做範例,可能與原文不同,舉例不好請指正) If $var > 0 Then MsgBox(4096,"", "Value is positive.") ElseIf $var < 0 Then MsgBox(4096,"", "Value is negative.") Else
如: ;Print all numbers from 1 to 10 except number 7 For $i = 1 to 10 If $i = 7 Then ContinueLoop MsgBox(0, "The value of $i is:", $i) Next ;Example of using level is needed.
如: Switch @HOUR Case 6 To 11 $msg = "Good Morning" Case 12 To 17 $msg = "Good Afternoon" Case 18 To 21 $msg = "Good Evening" Case Else $msg = "What are you still doing up?" EndSwitch