• 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: how to tell iTunes to play specific song
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to tell iTunes to play specific song


  • Subject: Re: how to tell iTunes to play specific song
  • From: LuKreme <email@hidden>
  • Date: Mon, 22 Feb 2010 13:38:55 -0700

On 22-Feb-2010, at 08: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)


I have this in a shell script.

try
tell application "iTunes"
set mytrack to (first track of view of front window whose (name contains "$2" and artist contains "$3"))
play mytrack
set x to name of current track & " by " & artist of current track & ""
set result to x
end tell
on error
Set x to "Couldn't find song $2 by $3"
set result to x
end


--
Bart: That was the worst day of my life
Homer: That was the worst day of your life SO FAR.

_______________________________________________
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
  • Follow-Ups:
    • Re: how to tell iTunes to play specific song
      • From: LuKreme <email@hidden>
References: 
 >how to tell iTunes to play specific song (From: Josh Cheek <email@hidden>)

  • Prev by Date: Re: how to tell iTunes to play specific song
  • Next by Date: Re: how to tell iTunes to play specific song
  • Previous by thread: Re: how to tell iTunes to play specific song
  • Next by thread: Re: how to tell iTunes to play specific song
  • Index(es):
    • Date
    • Thread