• 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
Re: Determinating iChat status
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determinating iChat status


  • Subject: Re: Determinating iChat status
  • From: Andreas Mayer <email@hidden>
  • Date: Mon, 31 May 2004 14:47:41 +0200

Am 31.05.2004 um 10:33 schrieb Aidas Dailide:

I've tried to use AppleScript to do so, but unfortunately to make it work iChat has to be opened.

You could check if iChat is running before you execute the script:

- (BOOL)appRunningWithBundleIdentifier:(NSString *)bundleIdentifier
{
BOOL result = NO;
NSArray *allApps = [[NSWorkspace sharedWorkspace] launchedApplications];
NSEnumerator *enumerator = [allApps objectEnumerator];
NSDictionary *app;
while (app = [enumerator nextObject]) {
if ([[app objectForKey:@"NSApplicationBundleIdentifier"] isEqualToString:bundleIdentifier])
{
result = YES;
break;
}
}
return result;
}

if ([self appRunningWithBundleIdentifier:@"com.apple.iChat"]) {
... execute script ...
}


Andreas
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Determinating iChat status
      • From: David Remahl <email@hidden>
References: 
 >Determinating iChat status (From: Aidas Dailide <email@hidden>)

  • Prev by Date: Re: Code Guidelines
  • Next by Date: Re: NSSavePanel can't enter filename
  • Previous by thread: Re: Determinating iChat status
  • Next by thread: Re: Determinating iChat status
  • Index(es):
    • Date
    • Thread