• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Hanging when using NSAppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: canAsynchronouslyWriteToURL:ofType:forSaveOperation: Prevent Quit?
  • Next by Date: Re: canAsynchronouslyWriteToURL:ofType:forSaveOperation: Prevent Quit?
  • Previous by thread: Re: canAsynchronouslyWriteToURL:ofType:forSaveOperation: Prevent Quit?
  • Next by thread: SpriteKit
  • Index(es):
    • Date
    • Thread