AppleScript附带了我购买的视频转换程序。它会查看下载视频的文件夹,然后将该视频导入应用程序。问题是它还会导入MP3,这是不可接受的。任何人都可以告诉我如果该文件不是MP3,我将如何将此脚本编辑为import
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
答案 0 :(得分: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