Apple script question

Discussion in 'Mac Programming' started by Tech198, Feb 6, 2016.

  1. Tech198 macrumors G5

    Mar 21, 2011
    Australia, Perth
    Hi all... what is the command for copying meta-tags from one to the other ?

    I've tried duplicate and copy, but neither work, unless i'm using it wrong

    This is what the syntax i currently have:

    copy composer of selection
    in the above case, i have two songs selected in iTunes, and wish to copy Composer tag of one song, to Composer field of the other, which is currently blank. I will expand of this later, but for now, i'm starting small.
  2. superscape macrumors 6502a


    Feb 12, 2008
    East Riding of Yorkshire, UK

    That's not a lot to go on!

    Can you let us see the full script you have, rather than just one line out of it?
    --- Post Merged, Feb 8, 2016 ---
    OK, I'm in a good mood so here's something to set you off in the right direction:

    tell application "iTunes"
        --let the user enter the new composer name
       set theNewComposerName to text returned of (display dialog "Enter composer name..." default answer "")
           --try to set the composer and log some details if it fails
           --e.g. because you don't have the right file permission
           set composer of item 1 of selection to theNewComposerName
       on error theError
           --alert the user to the error
           display dialog "Failed to set composer" buttons {"OK"} with icon 0
           --log the details of error
           log theError
      end try
    end tell

    ...have a look in the Scripting Dictionary for iTunes. Note that you can get and set the composer. ;-)

Share This Page