hello everybody,
this is a very strange problem, i could not resolve nor understand:
i am trying to get the name of every track whose artist is a certain string.
this works great when the artist is taken from the name of the selected track in itunes.
it doesn˜t work if the artist is entered in a dialog window by the user.
i can˜t see why, tried various class types for the artist (utxt, list, text, string)
still i couldn’t get it to work, please help!
jns
try
tell application "iTunes"
set fixed indexing to false
set myCache to item 1 of artist of selection
-- display dialog class of myCache
set myLTracks to name of every track of library playlist 1 whose artist is myCache
end tell
on error
display dialog "Enter an artists name." default answer "" with icon 1
set myCache to text returned of result
if myCache is "" then error number -128
tell application "iTunes"
set myLTracks to name of every track of library playlist 1 whose artist is myCache
end tell
end try