我正在尝试完全自动化将图像导入 iPhoto 的工作流程。最后一块拼图是处理重复的图像。目前,我在 Applescripts 导入命令中看不到不导入重复项的方法。因此,当出现重复时,所有工作流程都会停止,iPhoto 会等待输入。
有没有办法解决这个问题?
我正在尝试完全自动化将图像导入 iPhoto 的工作流程。最后一块拼图是处理重复的图像。目前,我在 Applescripts 导入命令中看不到不导入重复项的方法。因此,当出现重复时,所有工作流程都会停止,iPhoto 会等待输入。
有没有办法解决这个问题?
您需要为此编写脚本。这是一些似乎可以在 applescript 编辑器中运行的代码。相应地调整自动机...
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