1

「ビデオの種類」の行のコメントを外すと、すべてのファイルがライブラリに追加されるわけではなく、追加されたファイルの一部が処理されません(シャッフル可能およびブックマーク可能なフラグを含む)。

on adding folder items to my_folder after receiving the_files
    repeat with i in the_files
        tell application "iTunes"
            set newAddition to add i
            tell newAddition
                (* set video kind to music video *)
                set shufflable to true
                set bookmarkable to false
            end tell
        end tell
    end repeat
end adding folder items to
4

1 に答える 1

1

「ビデオの種類を設定」は、すべての種類のメディア(トラック)で機能するとは限りません。

とにかく、すべてのiTunesコードをエラー防止するのは良いことなので、iTunesで何かを変更するときはいつでも、「試行/エラー」ルーチンを追加して、思い通りに反応できるようにしてください。

これはあなたに素晴らしいエラーダイアログを示しています:

 try
      set video kind to music video
 on error the error_message number the error_number
      display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
 end try

この方法で一度試してみてください。失敗すると、エラー番号とメッセージが表示されます。

お役に立てば幸いです。

ところで:「Apple-ScriptEditor」内でCTRLキーを押しながらクリックすると、そのようなスニペットを選択して貼り付けることができます。

于 2012-08-30T06:24:02.563 に答える