Re: Quit iTunes

2008-05-25 Thread Uli Kusterer
Am 24.05.2008 um 17:49 schrieb Mr. Gecko: How would I quit iTunes. There is a way to launch it with NSWorkspace but how about quit? You could use the scripting bridge. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de __

Re: Quit iTunes

2008-05-24 Thread Gregory Weston
Mr. Gecko wrote: That is slow because it has to compile. but if I can't get this apple event to work than I might do that It's not Cocoa, but it is efficient... To find out if an app with a given bundle ID is running: #include "ProcessIsRunningWithBundleID.h" #include int ProcessIsRunningW

Re: Re: Quit iTunes

2008-05-24 Thread Daniel Dickison
NSAppleScript * script = [[[NSAppleScript alloc] initWithSource:@"tell application \"iTunes\" \n quit \nend tell"] autoRelease]; [script executeAndReturnError: nil]; That is slow because it has to compile. but if I can't get this apple event to work than I might do that I would hope that

Re: Quit iTunes

2008-05-24 Thread Mr. Gecko
Thank you so much it works. On May 24, 2008, at 2:38 PM, has wrote: Mr. Gecko wrote: How would I quit iTunes. There is a way to launch it with NSWorkspace but how about quit? Send a quit AppleEvent How would I do that? I have been looking for a while and I found aevtquit but I can't find

Re: Quit iTunes

2008-05-24 Thread Mr. Gecko
That is slow because it has to compile. but if I can't get this apple event to work than I might do that On May 24, 2008, at 2:23 PM, Tommy Nordgren wrote: On 24 maj 2008, at 18.33, Mr. Gecko wrote: How would I do that? NSAppleScript * script = [[[NSAppleScript alloc] initWithSource:@"

Re: Quit iTunes

2008-05-24 Thread has
Mr. Gecko wrote: How would I quit iTunes. There is a way to launch it with NSWorkspace but how about quit? Send a quit AppleEvent How would I do that? I have been looking for a while and I found aevtquit but I can't find out how to send. Example: #include OSStatus QuitApplication(char

Re: Quit iTunes

2008-05-24 Thread Tommy Nordgren
On 24 maj 2008, at 18.33, Mr. Gecko wrote: How would I do that? NSAppleScript * script = [[[NSAppleScript alloc] initWithSource:@"tell application \"iTunes\" \n quit \nend tell"] autoRelease]; [script executeAndReturnError: nil]; I have been looking for a while and I found a

Re: Quit iTunes

2008-05-24 Thread I. Savant
On May 24, 2008, at 12:33 PM, Mr. Gecko wrote: How would I do that? I have been looking for a while and I found aevtquit but I can't find out how to send. Read the documentation: http://developer.apple.com/documentation/AppleScript/Conceptual/AppleEvents/intro_aepg/chapter_1_section_1.htm

Re: Quit iTunes

2008-05-24 Thread Mr. Gecko
How would I do that? I have been looking for a while and I found aevtquit but I can't find out how to send. On May 24, 2008, at 11:13 AM, Tommy Nordgren wrote: On 24 maj 2008, at 17.49, Mr. Gecko wrote: How would I quit iTunes. There is a way to launch it with NSWorkspace but how about qu

Re: Quit iTunes

2008-05-24 Thread Tommy Nordgren
On 24 maj 2008, at 17.49, Mr. Gecko wrote: How would I quit iTunes. There is a way to launch it with NSWorkspace but how about quit? ___ Send a quit AppleEvent -- "Home is not where you ar