Re: How to tell if iTunes is running.
Re: How to tell if iTunes is running.
- Subject: Re: How to tell if iTunes is running.
- From: "Mr. Gecko" <email@hidden>
- Date: Sat, 24 May 2008 10:29:03 -0500
Thanks I am using this
iTunesIsOpen = NO;
[iTunesLMenu setTitle: NSLocalizedString(@"Launch iTunes",@"")];
NSArray *lApplications = [[NSWorkspace sharedWorkspace]
launchedApplications];
int a;
for (a=0; a<[lApplications count]; a++) {
NSDictionary *applicationD = [lApplications objectAtIndex:a];
if ([[applicationD objectForKey:@"NSApplicationName"]
isEqualToString:@"iTunes"]) {
iTunesIsOpen = YES;
[iTunesLMenu setTitle: NSLocalizedString(@"Quit iTunes",@"")];
}
}
On May 23, 2008, at 5:07 PM, Nick Zitzmann wrote:
On May 23, 2008, at 4:01 PM, Mr. Gecko wrote:
How can I tell if iTunes is running with cocoa.
In this particular case, you should be able to get that information
using -[NSWorkspace launchedApplications]...
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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