我正在寻找一种解决方案,我可以在本地运行AppleScript,在OSX Photos应用程序中拍摄智能文件夹中的一堆照片,并将它们放在非智能等效物中。我找到了一个很大程度上这样做的脚本:
on run {input, parameters}
tell application "Photos"
get folder "Managing the library"
set smartAlb to album "Measurements"
set regAlbName to "Measurements-Static"
tell album regAlbName to if exists then delete
set regAlb to make new album named regAlbName
add (get media items of smartAlb) to regAlb
end tell
end run
但是,虽然我可以设置从哪里获取信息的文件夹,但新照片会在照片的顶层创建。我所追求的是对显示的代码的调整,以确保新相册在同一文件夹中创建(目前称为“管理库”)。我尝试了各种各样的但我不是常规的AppleScript用户,也无法在线找到答案。
感谢人们提供的任何帮助:)
答案 0 :(得分:0)
您必须添加位置信息以创建新文件夹。而不只是让文件夹Managing the library
分配对变量的引用,并将其传递到make new album
行。
on run {input, parameters}
tell application "Photos"
set manageFolder to folder "Managing the library"
set smartAlb to album "Measurements"
set regAlbName to "Measurements-Static"
tell album regAlbName to if exists then delete
set regAlb to make new album named regAlbName at manageFolder
add (get media items of smartAlb) to regAlb
end tell
end run