repeat
display alert "Don't you dare close this button" buttons {"ok"}
if the button returned of the result is "ok" then
    display notification with title ":))))))))" subtitle "muahahahahahhh" sound name "Frog"
    display alert "Don't you dare close this button" buttons {"ok"}
    display alert "Don't you dare close this button" buttons {"ok"}
end if
end repeat我不知道我做错了什么,我做了两个显示警报。也许有人能帮我这个忙?提前谢谢你
发布于 2021-09-14 16:28:00
你不能,但是…
如果您从其他进程中获得了一点帮助,您可以:
ignoring application responses
    tell application "Finder" to display alert "Don't you dare close this button" buttons {"ok"}
    display alert "Don't you dare close this button" buttons {"ok"}
end ignoring不幸的是,警报在屏幕上的相同位置。
顺便说一句,你的测试"if the button returned of the result is "ok" then“是没用的,因为结果只能是"ok”。
https://stackoverflow.com/questions/69175665
复制相似问题