Re: Current playlist in iTunes if not playing...
Re: Current playlist in iTunes if not playing...
- Subject: Re: Current playlist in iTunes if not playing...
- From: Jakob Peterhänsel <email@hidden>
- Date: Fri, 4 Apr 2003 22:43:39 +0200
Ok, found a 'work-around':
This seems to work for some strange reason:
tell application "iTunes"
set plSelected to 1
try
set pli to index of current playlist
set plSelected to pli
end try
end tell
On fredag, apr 4, 2003, at 15:16 Europe/Copenhagen, Jakob Peterhdnsel
wrote:
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
'I don't have to try to be a sex bomb, I am one!'
- Kylie Minogue
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.