objective c - Mail: Application isn't running -
i'm trying execute simple applescript in objective-c. code is:
nsstring *emailstring = @"tell application \"mail\" activate";  nsapplescript *emailscript = [[nsapplescript alloc] initwithsource: emailstring];  nsdictionary *errordict = null;  [emailscript executeandreturnerror: &errordict]; and got annoying error:
nsapplescripterrormessage: mail got error: application isn’t running. nsapplescripterrorrange: nsrange: {27, 8} nsapplescripterrorbriefmessage: application isn’t running. nsapplescripterrornumber: -600 nsapplescripterrorappname: mail
it's no problem if execute script script editor. need — thanks!
solved. app using sandbox. , if want run applescript it, need edit entitlements file. in me case this help.
Comments
Post a Comment