Quit app after window is closed in AppleScript

夙愿已清 提交于 2019-12-14 01:34:39

问题


I've created an AppleScript app in Xcode and I would like to know how to get the app to quit after the window is closed.


回答1:


Add a applicationShouldTerminateAfterLastWindowClosed: method in your AppDelegate, for example:

on applicationShouldTerminateAfterLastWindowClosed_(sender)
    return true
end applicationShouldTerminateAfterLastWindowClosed_


来源:https://stackoverflow.com/questions/8365737/quit-app-after-window-is-closed-in-applescript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!