1

トラックのタイトルに基づいて、あるバージョンのアルバムの再生回数を別のバージョンにコピーできるスクリプトを作成しようとしています。

基本的に、シナリオは、すべての再生回数と一緒に自分のコンピューターにアルバムがあるということです。次に、元の CD を高品質で再リッピングします (以前は、品質に対する私の好みは非常に低かった)。

ここで、古い質の悪いリッピングのプレイカウントを新しい高品質のリッピングに自動的にコピーしたいと考えています。

これを行うために Doug Adams のスクリプトを採用しましたが、実行しようとすると、「記述子の型の不一致が発生しました」というメッセージが表示されます。問題のある行については何の指示もありません。

私は Apple Script を使ったことがありません。問題がどこにあるのか誰か知っていますか?

global thismany
tell application "iTunes"
    if selection is not {} then
        set sel to selection
        repeat with t in sel
            set t to contents of t
            if class of t is file track or class of t is URL track then
                if played count of t is 0 then
                    set thismany to 0
                    repeat with t2 in sel
                        set t2 to contents of t2
                        if class of t2 is file track or class of t2 is URL track then
                            if title of t is equal to title of t2 and t2 is not t then
                                set thismany to played count of t2
                                exit repeat
                            end if
                        end if
                    end repeat
                    set played count of t to (thismany as integer)
                    if (thismany as integer) is 0 then
                        try
                            set played date of t to missing value
                        end try
                    end if
                end if
            end if
        end repeat
    else -- no track selected
        tell me to message_and_cancel("No tracks selected.")
    end if
end tell
4

1 に答える 1

0

私はこれを理解しました。問題は、トラックの のようなものがないことでした。titleプロパティはトラックの と呼ばれnameます。

興味のある方は、完全なスクリプトをここで見つけることができます。

于 2013-05-19T10:55:34.987 に答える