2013-05-29 70 views
0

這AppleScript附帶了我購買的視頻轉換程序。它觀看下載視頻的文件夾,然後將該視頻導入到應用程序中。問題是它也會導入MP3,這是不可接受的。任何人都可以告訴我,如果該文件不是MP3,我將如何編輯此腳本只有import如何獲取此AppleScript以排除某種文件類型?

on adding folder items to thisFolder after receiving addedItems 

    repeat with movieFile in addedItems 
     tell application "iFlicks" 
      import movieFile without gui 
     end tell 
    end repeat 

end adding folder items to 

回答

1

嘗試:

on adding folder items to thisFolder after receiving addedItems 
    repeat with movieFile in addedItems 
     set isMP3 to false 
     tell application "System Events" to if name extension of (contents of movieFile) is "mp3" then set isMP3 to true 
     if not isMP3 then tell application "iFlicks" to import movieFile without gui 
    end repeat 
end adding folder items to 
相關問題