本帖最后由 autoit3CN 于 2009-5-19 02:46 编辑
ContinueCase
------------------------------------------------------------------------
Abort the current case and continue a case into the next case in a Select or Switch block.
终止目前的case,并继续到下一个已选择的case
------------------------------------------------------------------------
Normally in a Select or Switch block, a case ends when the next Case statement is encountered. Executing the ContinueCase will tell AutoIt to stop executing the current case and start executing the next case.
Trying to execute ContinueCase outside of a Select or Switch will cause a fatal error.
通常在一个判断或Switch事件,一个判断结束时,下一个判断语句继续。执行ContinueCase会告诉AutoIt停止执行目前的情况下,并开始执行下一个案件。试图执行ContinueCase之外的判断或Switch事件将导致致命错误
运用例子:$msg = ""
$szName = InputBox(Default, "请输入任意字母", "", " M", Default, Default, Default, Default, 10)
Switch @error
Case 2
$msg = "超时"
ContinueCase
Case 1;继续之前的判断
$msg &= "并准备取消退出";如果你长时间不输入他会显示‘超时并准备取消退出’
Case 0
Switch $szName
Case "a", "e", "i", "o", "u"
$msg = "你输入的是元音"
Case "QP"
$msg = "数学"
Case "Q" to "QZ"
$msg = "科学"
Case Else
$msg = "其他"
EndSwitch
Case Else
$msg = "运行出错"
EndSwitch
MsgBox(0, Default, $msg)[/
不是严格翻译,大概意思你可意会不可言传
------------------------------------------------------------------------
相关的还有continueloop【继续一个 While/Do/For 循环】,ExitLoop 【终止一个 While/Do/For 循环】 |