首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AppleScript iPhoto导入命令(如何处理重复项)

AppleScript iPhoto导入命令(如何处理重复项)
EN

Stack Overflow用户
提问于 2014-10-03 02:15:52
回答 1查看 649关注 0票数 0

我正在尝试完全自动化将图像导入iPhoto的工作流程。最后一块拼图是处理重复图像。目前我在Applescripts import命令中看不到不导入副本的方法。因此,当重复数组出现时,所有工作流都会停止,iPhoto会等待输入。

有没有办法解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2014-10-08 00:02:32

您将需要编写此脚本。下面是一小段在applescript编辑器中工作的代码。对automator进行相应的调整...

代码语言:javascript
复制
set iFolder to (choose folder)

set iFiles to (list folder iFolder)

tell application "iPhoto"
    repeat with iFile in iFiles
        try
            set pFound to get (every photo of album "Photos" whose image filename is iFile)
        end try
        if length of pFound is not 0 then
            log ("File '" & iFile as text) & "' exists..."

            # Move or delete it here
        end if
    end repeat

    # Continue with import
    import from (iFolder as alias)
end tell
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26166984

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档