【发布时间】:2016-10-04 23:12:21
【问题描述】:
我正在尝试编写一个脚本来退出当前正在构建的应用程序的 Xcode。我当前的脚本仅涵盖退出 Xcode,但我无法处理 Xcode 上弹出的确认对话框。在确认框中,有两个按钮选项:取消或停止任务。我想点击停止任务按钮。请帮忙。
这是我目前的 AppleScript:
set apps to {"Simulator","Xcode"}
repeat with thisApp in apps
tell application thisApp to quit
end repeat
tell application "System Events"
tell process "Xcode"
click button "Stop Tasks" of sheet 1 of window 1
end tell
end tell
这是我当前不起作用的applescript。
【问题讨论】:
标签: xcode applescript