Question

I am trying to execute a apple script which creates a new meeting invite on Outlook calendar. The Apple script is working as expected when i execute directly it is opening a new meeting window.But when i run through Xcode its creating a new meeting but not opening it.

Can some one please suggest me a solution. Below is code which i am trying to execute.

NSString *emailString = @"";
emailString = [NSString stringWithFormat:@"\
               tell application \"Microsoft Outlook\"\n\
               set currentTime to (the current date)\n\
               set newMeeting to make new calendar event with properties {subject:\"%@\", start time:(currentTime + (60 * 60)), end time:(currentTime + (60 * 60) + (60 * 60) / 2)}\n\
               Open newMeeting \n\
               end tell \n\
               ",@"adad"];

NSAppleScript *emailScript = [[NSAppleScript alloc] initWithSource:emailString];
[emailScript executeAndReturnError:nil];
[emailScript release];

Thanks In Advance.

No correct solution

OTHER TIPS

I am really sorry The above script works absolutely fine. This is a solution to open a new meeting window using apple script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top