#17 ✓resolved

check if app is running

Reported by GeorgS | April 19th, 2009 @ 10:25 AM

if I run [JSTalk application:"MyApp"] a second instance of my programms starts. So I would suggest to include this in JSTalk.m in line 245:

	// make sure it's running
	NSArray * Applications = [[[NSWorkspace sharedWorkspace] launchedApplications] valueForKey:@"NSApplicationBundleIdentifier"];

	if (![Applications containsObject:bundleId])

Thanks Georg

Comments and changes to this ticket

  • GeorgS

    GeorgS April 19th, 2009 @ 11:22 AM

    The same thing should be added to JSTalk.py

    	Applications = NSWorkspace.sharedWorkspace().launchedApplications().valueForKey_("NSApplicationBundleIdentifier")
    	if not bundleId in Applications:
    		NSWorkspace.sharedWorkspace().launchAppWithBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifier_(bundleId, NSWorkspaceLaunchWithoutActivation | NSWorkspaceLaunchAsync, None, None)
  • gus (at flyingmeat)

    gus (at flyingmeat) May 6th, 2009 @ 11:06 AM

    • State changed from “new” to “resolved”

    Thanks- I've got this added to the source.


Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Check out the readme: http://github.com/ccgus/jstalk/tree/master

People watching this ticket