Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Quit AppleScript App

Hello, I am creating an AppleScript app and have a button for quitting the app. What is the script so I can quit my app?

Thanks

Mac mini, OS X Mountain Lion (10.8.3)

Posted on Sep 12, 2013 4:25 PM

Reply
3 replies

Sep 12, 2013 5:32 PM in response to AppleMan001

In your button handler you can use a statement such as:


tellmetoquit-- OK

-- or --

current application's NSApp's terminate() -- better

If there isn't anything else that your button handler is doing, you can also just connect it to the application's terminate action (this will work the same as selecting the quit menu item) - in IB, select the Application object, look in the Connection Inspector for the terminate: action, and drag a connection to the button.

Quit AppleScript App

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.