Hanging when using NSAppleScript
Hanging when using NSAppleScript
- Subject: Hanging when using NSAppleScript
- From: Tim Hewett <email@hidden>
- Date: Mon, 21 Apr 2014 01:38:16 +0100
I’m using NSAppleScript to sent a message to another app using "tell application”. It works twice then the third time my app gets stuck in the call to executeAndReturnError: and doesn’t return.
The code is as follows, with sample AppleScript:
NSAppleScript *script = [[NSAppleScript alloc] initWithSource:@"tell application \"Safari\" to open location \"http://lists.apple.com\""];
NSDictionary *error = nil;
NSAppleEventDescriptor *rc;
rc = [script executeAndReturnError:&error];
[script release];
Any ideas why this gets stuck on the third execution? The program is a daemon process running in the background as a different user to the logged in user.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden