AppleScript 繰り返しであるfor文を使用するサンプル
環境
macOS 11.6
書式
set 変数 to {1, 2, 3,....}
repeat with i in 変数
i
end repeat
set 変数 to {1, 2, 3,....}
repeat with i in 変数
i
end repeat
set 変数 to {1, 2, 3,....} repeat with i in 変数 i end repeat
ファイル名:data.scpt
サンプルコード
set ns to {11, 32, 43}
repeat with i in ns
i
end repeat
set ns to {11, 32, 43}
repeat with i in ns
i
end repeat
set ns to {11, 32, 43} repeat with i in ns i end repeat
実行結果
osascript data.scpt