0

This AppleScript comes with a video conversion program I bought. It watches a folder for downloaded video, then imports that video into the application. The problem is that it also imports MP3s, which is unacceptable. Can anyone show me how I would edit this script to only import if the file is not an MP3?

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
4

1 回答 1

1

Try:

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
于 2013-05-29T02:07:26.707 回答