Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quit app after window is closed in 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.

like image 763
Will Coughlin Avatar asked Nov 17 '25 05:11

Will Coughlin


1 Answers

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

on applicationShouldTerminateAfterLastWindowClosed_(sender)
    return true
end applicationShouldTerminateAfterLastWindowClosed_