I want to create a applescript menu file for a application, I need to edit that file so i have script in text file and i have edit the file and save it as a script file, but unfortunately its not detecting as script file by application "Outlook Mac 2011" and even when i open this file into script editor and try to save it's throwing error of unable to save so please help me on this
userpath = [paths objectAtIndex:0];
userpath = [userpath stringByAppendingString:@"/Microsoft User Data/Outlook Script Menu Items/"];
userpath = [userpath stringByAppendingString:@"Create New Conference Event.scptd"];
[[NSFileManager defaultManager] createFileAtPath:userpath contents:[content dataUsingEncoding:NSUTF8StringEncoding] attributes:nil];
NSDictionary* errorDis = [[NSDictionary alloc] init];
NSAppleScript *script = [[NSAppleScript alloc] initWithContentsOfURL: [NSURL fileURLWithPath:userpath] error:&errorDis];
then I am trying to compile the edited file
NSDictionary* errors = [NSDictionary dictionary];
NSAppleScript* appleScript = [[NSAppleScript alloc] initWithContentsOfURL:url error:&errors];
[appleScript compileAndReturnError:&errors];
I am getting this error
Printing description of errors:
{
NSAppleScriptErrorNumber = "-43";
}