【发布时间】:2014-09-09 16:53:37
【问题描述】:
我正在尝试制作一个 Applescript 以与 VoiceOver 一起运行以弹出一个对话框,要求退出当前的应用程序。我能够让一个工作,但它只在某些时候工作。我相信这是因为某些应用程序中的内存问题,这就是为什么会有延迟。我试着告诉“最前面的”应用程序退出,但它也没有工作。
display dialog "Quit current application?" buttons {"cancel", "ok"} default button "ok"
if result = {button returned:"ok"} then
delay 1.7
tell application "System Events" to key code 12 using command down
else if result = {button returned:"cancel"} then
end if
【问题讨论】:
标签: macos applescript voiceover