Re: Play Playlist in iTunes

2008-10-04 Thread Graham Cox
On 5 Oct 2008, at 12:07 am, Mr. Gecko wrote: ran the time test on my play playlist function and it was time = -0.005 sec which is more than fast enough Cool! You get the result back before you sent the query - that is fast! ;-) G. ___ Cocoa-

Re: Play Playlist in iTunes

2008-10-04 Thread Mr. Gecko
Ok thanks for the tips I ran the time test on my play playlist function and it was time = -0.005 sec which is more than fast enough for me. especially when my computer is 733Mhz. On Oct 4, 2008, at 4:26 AM, has wrote: On 4 Oct 2008, at 03:54, Mr. Gecko wrote: I am not using AppleScript t

Re: Play Playlist in iTunes

2008-10-04 Thread has
On 4 Oct 2008, at 03:54, Mr. Gecko wrote: I am not using AppleScript to do this, I am using AppleEvents, as you can see in code below. Aware of that. You'll often find that folks use the name "AppleScript" as a catch-all term for anything relating to Apple event IPC. It's easy to lapse i

Re: Play Playlist in iTunes

2008-10-03 Thread Mr. Gecko
I am not using AppleScript to do this, I am using AppleEvents, as you can see in code below. This is way faster than using AppleScript. - (void)playPlaylist:(NSString *)playlist { OSErr err; AppleEvent cmdEvent; err = AEBuildAppleEvent(iTunesSignature,

Re: Play Playlist in iTunes

2008-10-03 Thread has
On 3 Oct 2008, at 17:09, Mr. Gecko wrote: On Thu, Oct 2, 2008 at 9:52 PM, Mr. Gecko wrote: I know but I can't find out the AppleEvent for Play Playlist. Is there some sort of a program that will parse the AppleScript and make an cocoa AppleEvent code. If you just want the raw four-char-co

Re: Play Playlist in iTunes

2008-10-03 Thread Mr. Gecko
I made it work for EyeTunes, added the functions -playPlaylist: (NSString *)playlist; and -playTrack:(long)track ofPlaylist:(NSString *)playlist; AEDebugSends=1 /Applications/AppleScript/Script\ Editor.app/Contents/ MacOS/Script\ Editor is extremely useful for finding this stuff out. I will try

Re: Play Playlist in iTunes

2008-10-03 Thread Mr. Gecko
On Oct 3, 2008, at 10:10 AM, has wrote: Michael Ash wrote: On Thu, Oct 2, 2008 at 9:52 PM, Mr. Gecko wrote: I know but I can't find out the AppleEvent for Play Playlist. Is there some sort of a program that will parse the AppleScript and make an cocoa AppleEvent code. If you just want

Re: Play Playlist in iTunes

2008-10-03 Thread has
Michael Ash wrote: On Thu, Oct 2, 2008 at 9:52 PM, Mr. Gecko wrote: I know but I can't find out the AppleEvent for Play Playlist. Is there some sort of a program that will parse the AppleScript and make an cocoa AppleEvent code. If you just want the raw four-char-codes from an application

Re: Play Playlist in iTunes

2008-10-02 Thread Mr. Gecko
Thanks for that, All i'll have to do now is find out how it puts together the AppleEvent and than I can add it to EyeTunes as an function. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comment

Re: Play Playlist in iTunes

2008-10-02 Thread Mr. Gecko
No I won't be able to use EyeTunes I looked, I had to add some of my own functions into it to make it do what I wanted with volumes. so I may add the play playlist function to it when I find out how I can do it with AppleEvent. ___ Cocoa-dev maili

Re: Play Playlist in iTunes

2008-10-02 Thread Michael Ash
On Thu, Oct 2, 2008 at 9:52 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: > I know but I can't find out the AppleEvent for Play Playlist. > Is there some sort of a program that will parse the AppleScript and make an > cocoa AppleEvent code. Not quite, but you can get pretty close. Go to the section tit

Re: Play Playlist in iTunes

2008-10-02 Thread Michael Ash
On Thu, Oct 2, 2008 at 6:35 PM, has <[EMAIL PROTECTED]> wrote: > Michael Ash wrote: > >> On Wed, Oct 1, 2008 at 10:16 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: >>> >>> I think I would just use this AppleScript call >>> [[[NSAppleScript alloc] initWithSource:[NSString stringWithFormat:@"tell >>> appl

Re: Play Playlist in iTunes

2008-10-02 Thread Mr. Gecko
I know but I can't find out the AppleEvent for Play Playlist. Is there some sort of a program that will parse the AppleScript and make an cocoa AppleEvent code. On Oct 2, 2008, at 6:09 PM, Kyle Sluder wrote: On Thu, Oct 2, 2008 at 6:45 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: I think I'll s

Re: Play Playlist in iTunes

2008-10-02 Thread Kyle Sluder
On Thu, Oct 2, 2008 at 6:45 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: > I think I'll stick with AppleScript If you do, you're dependent on the AppleScript parser, which is an awfully hefty dependency when you know precisely what Apple Events you want to send. Your software quality will be much imp

Re: Play Playlist in iTunes

2008-10-02 Thread Mr. Gecko
I think I'll stick with AppleScript On Oct 2, 2008, at 5:35 PM, has wrote: Michael Ash wrote: On Wed, Oct 1, 2008 at 10:16 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: I think I would just use this AppleScript call [[[NSAppleScript alloc] initWithSource:[NSString stringWithFormat:@"tell appli

Re: Play Playlist in iTunes

2008-10-02 Thread has
Michael Ash wrote: On Wed, Oct 1, 2008 at 10:16 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: I think I would just use this AppleScript call [[[NSAppleScript alloc] initWithSource:[NSString stringWithFormat:@"tell application \"iTunes\" to play playlist \"[EMAIL PROTECTED]"", [self replace:@"\"

Re: Play Playlist in iTunes

2008-10-02 Thread has
Mr. Gecko wrote: Ok I now read everything in the programming guide for Scripting Bridge and it is really cool, Now I can't seem to find out how to play a playlist from a name id or anything. If you know how to write an application command in AppleScript, e.g.: tell application "iTune

Re: Play Playlist in iTunes

2008-10-01 Thread Michael Ash
On Wed, Oct 1, 2008 at 10:16 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: > I think I would just use this AppleScript call > [[[NSAppleScript alloc] initWithSource:[NSString stringWithFormat:@"tell > application \"iTunes\" to play playlist \"[EMAIL PROTECTED]"", [self > replace:@"\"" > with:@"\\\"" so

Re: Play Playlist in iTunes

2008-10-01 Thread Mr. Gecko
I think I would just use this AppleScript call [[[NSAppleScript alloc] initWithSource:[NSString stringWithFormat:@"tell application \"iTunes\" to play playlist \"%@ \"", [self replace:@"\"" with:@"\\\"" source:[sender title executeAndReturnError:nil]; Works fast enough for me and it would

Re: Play Playlist in iTunes

2008-10-01 Thread Mr. Gecko
Ok I now read everything in the programming guide for Scripting Bridge and it is really cool, Now I can't seem to find out how to play a playlist from a name id or anything. How would I do that? Thanks, Mr. Gecko On Oct 1, 2008, at 1:10 PM, Uli Kusterer wrote: On 01.10.2008, at 19:51, Mr.

Re: Play Playlist in iTunes

2008-10-01 Thread Mr. Gecko
SBApplication sounds easier than using EyeTunes, maybe I would make a switch. I'll have to play with it to see what I can do. On Oct 1, 2008, at 1:10 PM, Uli Kusterer wrote: On 01.10.2008, at 19:51, Mr. Gecko wrote: Hello I am needing to know how to play a playlist in iTunes using AppleEve

Re: Play Playlist in iTunes

2008-10-01 Thread Mr. Gecko
Well which ever one is faster, I know for applescript to work it would have to compile the code before it runs so that takes a bit of time. Mr. Gecko On Oct 1, 2008, at 1:10 PM, Uli Kusterer wrote: On 01.10.2008, at 19:51, Mr. Gecko wrote: Hello I am needing to know how to play a playlist i

Re: Play Playlist in iTunes

2008-10-01 Thread Robert Marini
You may be able to do what you want with http://www.liquidx.net/eyetunes/ -rob. On Oct 1, 2008, at 2:10 PM, Uli Kusterer wrote: On 01.10.2008, at 19:51, Mr. Gecko wrote: Hello I am needing to know how to play a playlist in iTunes using AppleEvents. I am able to get the Playlist ID and the

Re: Play Playlist in iTunes

2008-10-01 Thread Randall Meadows
On Oct 1, 2008, at 12:07 PM, Loren Ryter wrote: You can't play a playlist. You have to play a track on it -- either the first track or a random track. Sure you can. See my response to the OP; that AppleScript certainly started playing the tracks in the playlist with specifying a specific

Re: Play Playlist in iTunes

2008-10-01 Thread Uli Kusterer
On 01.10.2008, at 19:51, Mr. Gecko wrote: Hello I am needing to know how to play a playlist in iTunes using AppleEvents. I am able to get the Playlist ID and the Playlist Persistent ID from the iTunes Database. I just need to know how to tell iTunes to play it. 'Scripting Bridge', or if

Re: Play Playlist in iTunes

2008-10-01 Thread Loren Ryter
You can't play a playlist. You have to play a track on it -- either the first track or a random track. On 10/1/08 1:51 PM, "Mr. Gecko" <[EMAIL PROTECTED]> wrote: > Hello I am needing to know how to play a playlist in iTunes using > AppleEvents. I am able to get the Playlist ID and the Playlist >

Re: Play Playlist in iTunes

2008-10-01 Thread Randall Meadows
On Oct 1, 2008, at 11:51 AM, Mr. Gecko wrote: Hello I am needing to know how to play a playlist in iTunes using AppleEvents. I am able to get the Playlist ID and the Playlist Persistent ID from the iTunes Database. I just need to know how to tell iTunes to play it. Did you look at the iTu

Play Playlist in iTunes

2008-10-01 Thread Mr. Gecko
Hello I am needing to know how to play a playlist in iTunes using AppleEvents. I am able to get the Playlist ID and the Playlist Persistent ID from the iTunes Database. I just need to know how to tell iTunes to play it. Thanks for help/tips, Mr. Gecko ___