On 2009 Jul 20, at 02:06, rethish wrote:

I had tried using a plist file and launchd to do it, but it always opens in
a new application.

Instead of launching your application directly, you need to have launchd launch a little process of some kind which will do what you want.

Is this can be done using applescript ?

Actually, that might work.  An AppleScript such as

  tell application "MyApp"
       ...[do what I want]...
  end tell

will not launch a new instance of MyApp if MyApp is already running.

But your app has to be scriptable -- the "do what I want" part

If so, the "little process of some kind" could be an AppleScript application bundle.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to