0
我在一个文件夹中有婴儿照片,我想每隔一小时(4000秒3600秒)一次上传它们到共享的iCloud专辑中,我的所有亲戚都会看到在他们的iPhone,iPad和Mac上。这是我的applescript保存为一个应用程序与保持打开框中检查。我认为这不太合适。怎么了?用photos.app和applescript每小时上传一个随机文件
on idle
set importFolder to "Amac:Users:AbuDavid:Downloads:uploadBABY"
set extensionsList to {"jpg", "png", "tiff"}
tell application "Finder" to set theFiles to some file of importFolder whose name extension is in extensionsList
if (count of theFiles) < 1 then
display dialog "No images selected!" buttons "OK"
else
set albumName to "BabyDouDou"
set timeNow to time string of (current date)
set today to date string of (current date)
set albumName to albumName & " " & timeNow & " " & today
set imageList to theFiles
tell application "Photos"
activate
delay 2
import imageList into albumName skip check duplicates yes
end tell
tell application "Finder" to move theFiles to trash
end if
return 4000
end idle