i’m trying to get a list of all tracks whose contens contain both, four empty spaces in a row and the @ symbol.
i’m not figuring out how to test the resulted list of the first boolean test for containment of the @ symbol.
any cluse?
jns
set myDelimiter to " "
set my2ndDelimiter to " @ "
tell application "iTunes"
set myL to get comment of every track of library playlist 1 whose comment contains myDelimiter
end tell
get every item of myL where it contains " @ "
it works for example with a second list and a repeat block
set myDelimiter to " "
set my2ndDelimiter to " @ "
tell application "iTunes"
try
set myL to get comment of every track of library playlist 1 whose comment contains myDelimiter
on error
display dialog "no match found"
end try
end tell
set My2ndL to {}
repeat with i in myL
if i contains my2ndDelimiter then set end of My2ndL to contents of i
end repeat
end
set myDelimiter to " "
set my2ndDelimiter to " @ "
tell application "iTunes"
set myL to get comment of every track of library playlist 1 whose (comment contains myDelimiter and comment contains my2ndDelimiter)
end tell
Just for future reference, AND (and OR) requires that both phrases connected by the ‘and’ have boolean results by themselves, e.g. contains “blah” and contains “bling” where each is a stand-alone boolean expression.