reference by range. Applescript.

Discussion in 'Mac Programming' started by fhill2, Jun 22, 2012.

  1. macrumors newbie

    Joined:
    May 9, 2012
    #1
    I need get names of playlists in iTunes by range.
    For example:

    tell application "iTunes" to name of playlists 3 thru 6

    Compiles but execute properly with error:
    iTunes got an error: Can’t get name of playlists 3 thru 6

    I have made sure there are atleast 6 playlists in itunes.
    Thanks.
     
  2. macrumors 6502

    Joined:
    May 29, 2011
    Location:
    Littleton, Colorado, USA
    #2
    Getting the playlists results in a list that can be indexed like any other, for example:

    Code:
    tell application "iTunes" to get items 3 thru 6 of (get name of playlists)
     
  3. thread starter macrumors newbie

    Joined:
    May 9, 2012
    #3
    this makes more sense. Thanks!
     

Share This Page