Whenever I try to quit an application using AppleScript I get the following error
An error of type -9874 has occurred.
The AppleScript command which I am using is
tell application "app_name"
quit
end tell
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you sure that “app_name” exists ? If it does exist, are you sure that it knows how to respond to AppleEvents (is “AppleEvent-aware”) ? Try the following test – launch
Activity Monitor(in/Applications/Utilities) and run this script:This works fine for me – if it works OK for you then the problem is probably with your specific application. If it doesn’t work for you then you have some kind of system-related problem – try it on a different Mac to verify ?