欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

關(guān) 鍵 字 參 考


For...In...Next

枚舉對(duì)象集合或數(shù)組的元素

For <變量> In <表達(dá)式>
    語(yǔ)句
    ...
Next

參 數(shù)

變量 已賦值的元素
表達(dá)式 描述對(duì)象的表達(dá)式, 或是至少是有一個(gè)元素的數(shù)組

備 注

即使有 MustDeclareVars 語(yǔ)句設(shè)置, 也無(wú)需聲明" 變量 ", 腳本將自動(dòng)創(chuàng)建這個(gè)局部" 變量 ".
如果"表達(dá)式"是沒(méi)有元素的對(duì)象集合, 或一個(gè)多維數(shù)組, 循環(huán)將被跳過(guò), "變量"將包含一個(gè)空字符串.
如果" 表達(dá)式 " 不是對(duì)象也不是數(shù)組, 腳本將以錯(cuò)誤停止, 除非已配置 COM 錯(cuò)誤處理程序.
使用 For...In 時(shí), Autoit 數(shù)組是只讀的. 雖然可以在 For...In 循環(huán)中指定變量值,
但這個(gè)變化并不反映到數(shù)組本身. 枚舉過(guò)程中修改數(shù)組的內(nèi)容, 使用 For...To 循環(huán)語(yǔ)句.

For...In...Next 語(yǔ)句允許嵌套使用.

相 關(guān) 函 數(shù)

With...EndWith

函 數(shù) 示 例


;Using an Array
Local $aArray[4]

$aArray[0] = "a"
$aArray[1] = 0
$aArray[2] = 1.3434
$aArray[3] = "測(cè)試"

Local $string = ""
For $element In $aArray
    $string = $string & $element & @CRLF
Next

MsgBox(0, "For..IN 數(shù)組測(cè)試", "結(jié)果: " & @CRLF & $string)

;使用對(duì)象集合

Local $oShell = ObjCreate("shell.application")
Local $oShellWindows = $oShell.windows

If IsObj($oShellWindows) Then
    $string = ""

    For $Window In $oShellWindows
        $string = $string & $Window.LocationName & @CRLF
    Next

    MsgBox(0, "", "您有以下窗口被打開:" & @CRLF & $string)
Else

    MsgBox(0, "", "你沒(méi)有打開的 shell 窗口.")
EndIf

provider with jb51.net (unicode)