I am trying to quit an application and having no luck. I used the standard tell application “app_name” quit. The problem is in this application when you quit, it comes up with a confirm “Do you really want to quit” window that you have to click “OK” or “Cancel”.
I did try using the GUI scripting Click “OK” of window “Confirm” this appeared to click the OK button, but did not do anything.
Instead of using UI scripting to click, have you tried sending a return character to the program? If the confirmation box has ‘OK’ as the default answer, then a return should do it. It would look something like:
tell application “System Events”
tell process “your_database_app”
keystroke return
end tell
end tell
Andy
p.s IIRC the application you are sending the keystroke to needs to be frontmost. You may need to: