• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Converting an array to formatted text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting an array to formatted text


  • Subject: Converting an array to formatted text
  • From: "@lbutlr" <email@hidden>
  • Date: Fri, 14 Jul 2017 16:11:24 -0600

I have the following code snippet:

set theAlbum to album of current track
set theArtist to artist of current track
set myTracks to (name of every track of view of front window whose album
contains theAlbum)
set the clipboard to (myTracks as text)

Which puts something like "Teen Age RiotSilver RocketThe Sprawl'Cross The
BreezeEric's TripTotal TrashHey JoniProvidenceCandleRain
KingKissabilityTrilogy" into the clipboard

I'd like to have that list at least comma separated, though i'd like full
control over it.

Also, I would like to select based on album name AND artist, but I can't get
that syntax right. Something along theses lines:

set myTracks to (name of every track of view of front window whose album
contains theAlbum and whose artist contains theArtist)

But I seem to recall that there was an issue with multiple criteria in iTunes,
so that may not be easily possible.

--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Converting an array to formatted text
      • From: Yvan KOENIG <email@hidden>
    • Re: Converting an array to formatted text
      • From: Steve Mills <email@hidden>
    • Re: Converting an array to formatted text
      • From: Jean-Christophe Helary <email@hidden>
  • Prev by Date: Re: 10.13 beta ?
  • Next by Date: Re: Converting an array to formatted text
  • Previous by thread: Re: MS Excel Save problem
  • Next by thread: Re: Converting an array to formatted text
  • Index(es):
    • Date
    • Thread