[英]'A end of line can't go after this “”"' in this applescript
I am writing an applescript to iterate thru all photo in the default album 'Photos' 我正在编写小程序以遍历默认相册“照片”中的所有照片
Here is my script: 这是我的脚本:
tell application "Photos"
activate
set alls = albums "Photos"
repeat with photo in alls
say photo.name
end repeat
end tell
Line 3. throws the following syntax error: 第3行引发以下语法错误:
I am new to this language and I am unable to find an remedy to the incorrect syntax. 我是该语言的新手,无法找到纠正错误语法的方法。 Can any one point out what is amiss here? 谁能指出这里有什么不对吗?
If you refer to the dictionary it helps to understand how each element is contained by other elements. 如果您参考字典,则有助于理解每个元素如何被其他元素包含。 To get the photos of all albums you have to loop through the media items of every album. 要获取所有专辑的照片,您必须循环浏览每个专辑的媒体项目。 This will get the filename of each photo. 这将获取每张照片的文件名。
tell application "Photos"
activate
set alls to every album
repeat with photoAlbum in alls
set photos to every media item in photoAlbum
repeat with photo in photos
get filename of photo
end repeat
end repeat
end tell
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.