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