我的第二个按钮的东西有一个问题与返回.如果你能帮忙请帮忙,这是AppleScript编辑器


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

这些对代码的细微调整应该可以达到您想要达到的效果。

在任何display dialogdisplay alert命令之前插入activate命令将确保对话框或警报窗口不会丢失在您可能打开的任何其他窗口之后。它应该把他们带到前面

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

相关内容

  • 没有找到相关文章

最新更新