display dialog "Error, Could not open chosen application. Try again in a few moments" buttons {"Report", "Ignore"} with icon 0
set the choice to the button returned of the result
if the choice is "Report" then
display dialog "Reporting to apple" with icon 0
end if
set the choice to the button returned of the result
if the choice is "Ignore" then
display dialog "ERROR ERROR. Computer Breached by Harmful Entity" with icon 0
end if
答案 0 :(得分:0)
对您的代码进行这些细微的调整应该可以实现您想要实现的目标。
在任何 activate
或 display dialog
命令之前插入 display alert
命令将确保对话框或警报窗口不会丢失在您可能打开的任何其他窗口之后。它应该把他们带到前面
activate
set theChoice to button returned of ¬
(display dialog "Error, Could not open chosen application. Try again in a few moments" buttons ¬
{"Report", "Ignore"} with icon 0)
if theChoice is "Report" then
activate
display dialog "Reporting to apple" with icon 0
else
activate
display dialog "ERROR ERROR. Computer Breached by Harmful Entity" with icon 0
end if