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)
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)
You can tell the current application to quit, but if this is an Xcode application you can also just connect the application's terminate action to the button in the Interface Editor.
Yes, it is an Xcode App. But what script would work??? I am clueless of how to quit it
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