退出应用程序窗口中的AppleScript关闭后 [英] Quit app after window is closed in AppleScript

查看:959
本文介绍了退出应用程序窗口中的AppleScript关闭后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个X code。将AppleScript的应用程序,我想知道如何获得应用程序窗口关闭后退出。

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.

推荐答案

添加<一个href=\"http://developer.apple.com/library/mac/#documentation/cocoa/Reference/NSApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40008592-CH1-SW9\">applicationShouldTerminateAfterLastWindowClosed:方法AppDelegate中,例如:

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

on applicationShouldTerminateAfterLastWindowClosed_(sender)
    return true
end applicationShouldTerminateAfterLastWindowClosed_

这篇关于退出应用程序窗口中的AppleScript关闭后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆