编程AppleScript编辑器,代码

时间:2015-09-03 12:18:16

标签: applescript

到目前为止,我有这个,但我想让它到找到窗口将打开多次,变量“amount”设置为

set volume 10
set amount to text returned of (display dialog "How many times?" default answer "More than 10")
tell application "Finder" to make new Finder window
repeat amount times
end repeat

如果有人能帮助我,我将不胜感激。

(脚本尚未完成)

1 个答案:

答案 0 :(得分:0)

快速回答: 将要重复的部分移动到重复...结束重复块:

set amount to text returned of (display dialog "How many times?" default answer "More than 10")
repeat amount times
    tell application "Finder" to make new Finder window
end repeat

也许您应该检查用户是否确实输入了数字值,以及在接下来的步骤中是否大于10。

享受,迈克尔/汉堡