Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 517783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:52:11+00:00 2026-05-13T07:52:11+00:00

How do I search for every song match certain criteria? E.g., something like: tell

  • 0

How do I search for every song match certain criteria? E.g., something like:

tell application "iTunes"
    set tracks to (every file track of playlist "Library" whose name contains "Green")
    repeat with t in tracks
        display dialog (t as string)
    end repeat
end tell
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:52:11+00:00Added an answer on May 13, 2026 at 7:52 am

    Just like that, except for two things; first, tracks is a reserved word in the iTunes scripting dictionary, so replace it with something else (e.g. ts); second, you can’t just convert a track to a string with t as string; you have to choose what information you want. For instance, if you want the name, you can use name of t as string; if you want more detail, you could do name of t & " - " & artist of t; etc. Note also that if you want a more complicated predicate, you can just tack it on to the whose clause; for instance, file tracks whose name contains "Green" and artist contains "Bird".

    If you want to golf the script a little, you could replace it with the following:

    tell application "iTunes"
        repeat with t in (file tracks whose name contains "Green")
            display dialog (name of t as string)
        end repeat
    end tell
    

    Removing the of playlist "Library" might produce slightly different results, but probably not. It didn’t in my quick testing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to search for every IP address in a curl output. Is
I would like to know if this code disallow every search engine to scan
I would like to be able to search every word so I have cleared
every search query is saved in my database, but I want to Limit the
I've a .net windows service which generates Lucene search indexes every night. I first
Every time I search on Google about OpenGL programming I found articles but it
Every time I search in visual studio using CTRL+F - it seems to get
I have a search functionality on my site that is accessible from every page.
For invoke search android example, every time query search result is received by onCreate().
I am trying to dynamically filter search results. Every result has tags associated with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.