• 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
Current playlist in iTunes if not playing...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Current playlist in iTunes if not playing...


  • Subject: Current playlist in iTunes if not playing...
  • From: Jakob Peterhänsel <email@hidden>
  • Date: Fri, 4 Apr 2003 15:16:05 +0200

Hi all

I would like to get the current playlist in iTunes, or a default of '1'.

It seems, though, that trying to get that if iTunes is NOT playing, will render the variable as 'not defined' although I a) pre-set/define the variable and b) do the assignment in a TRY statement.
Consider the following code:

tell application "iTunes"
global plSelected
set plSelected to 1
try
set plSelected to (index of current playlist)
on error
beep
end try
log plSelected
end tell


Here, the 'log' command will return 'variable plSelected is not defined' if iTunes is not playing.

How do I work around this???


Jakob Peterhdnsel

"All You have to decide is what to do, with the time that is given to you.
No one else can..."

Email: email@hidden
AIM: Marook
Phone: +45 40163806
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Current playlist in iTunes if not playing...
      • From: Jakob Peterhänsel <email@hidden>
    • Re: Current playlist in iTunes if not playing...
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Apropos of nothing
  • Next by Date: Internet connect help
  • Previous by thread: GUI Scripting in AS Studio
  • Next by thread: Re: Current playlist in iTunes if not playing...
  • Index(es):
    • Date
    • Thread