Re: how to tell iTunes to play specific song
Re: how to tell iTunes to play specific song
- Subject: Re: how to tell iTunes to play specific song
- From: hd <email@hidden>
- Date: Mon, 22 Feb 2010 18:04:15 +0000
Hi
play item 1 of my_search_results
(Search playlist returns a list of tracks, even if there's only one item in it.)
Or
play every track of playlist 1 whose name is "Push It" and artist is "Salt-N-Pepa"
As for the API, WYSIWYG AFAIK
HTH,
H
On 22 Feb 2010, at 15:12, Josh Cheek wrote:
> I can get the specific song I want, but can't figure out how to tell it to play it (the api is a little sparse)
>
> set start_time to 120 + 27
> set end_time to 120 + 42
> tell application "iTunes"
> set my_search_results to (search playlist 1 for "Salt-N-Pepa" only artists)
> play (track whose file track id is my_search_results)
> set player position to start_time
> delay end_time - start_time
> stop
> end tell
>
>
> I can also get it to play the song like this
> tell application "iTunes"
> play track "push it" in playlist 1
> end tell
>
> but it always finds "push it" by Garbage, which isn't the song I want it to play.
>
> I've been messing with this for a few hours now, and can't figure out what to do.
>
> Also, is there an API more prolific than the one in the Script Editor's library? The only AppleScript experience I have was some playing around in Automator.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden