applescript - iTunes -- making a script for copying album play counts -


i'm trying write script let me copy playcounts of 1 version of album based on title of tracks.

basically, scenario have album on computer along playcounts. rerip original cd higher quality (previously quality preference low).

now want automatically copy playcounts of old crappy quality rips new high quality ones.

i adopted script doug adams try this, when try run it gives me "a descriptor type mismatch occurred." without indication line problem is.

i've never used apple script before; know problem be?

global thismany tell application "itunes"     if selection not {}         set sel selection         repeat t in sel             set t contents of t             if class of t file track or class of t url track                 if played count of t 0                     set thismany 0                     repeat t2 in sel                         set t2 contents of t2                         if class of t2 file track or class of t2 url track                             if title of t equal title of t2 , t2 not t                                 set thismany played count of t2                                 exit repeat                             end if                         end if                     end repeat                     set played count of t (thismany integer)                     if (thismany integer) 0                         try                             set played date of t missing value                         end try                     end if                 end if             end if         end repeat     else -- no track selected         tell me message_and_cancel("no tracks selected.")     end if end tell 

i figured out, turns out problem there no such thing title of track, property called name of track.

if interested, full script can found here.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -