AppleScript to click "Don't Save" on window close
Posted
by
dsg
on Stack Overflow
See other posts from Stack Overflow
or by dsg
Published on 2011-02-15T07:22:18Z
Indexed on
2011/02/15
7:25 UTC
Read the original article
Hit count: 196
applescript
|savefiledialog
I am using AppleScript to close windows in Google Sketchup as follows:
$ osascript -e 'tell application "SketchUp" to close window 1'
When I close the window, the program prompts me to save, and there is a dialog box with buttons "Don't Save", "Cancel", and "Save...".
How do I make my script click on the "Don't Save" button in this situation?
Also, if there is a better way of closing the window, I'm all ears.
© Stack Overflow or respective owner