0
我使用下面的AppleScript在我的Automator工作流程:如何创建一个新的文件列表并返回它们?
on run {input, parameters}
--say input
set result_array to {} as list
try
repeat with this_file in input
tell application "Image Events"
launch
set this_image to open this_file
copy dimensions of this_image to {W, H}
close this_image
end tell
set text item delimiters to ":"
set file_name to last text item of (this_file as string)
set text item delimiters to ""
set filter_string to W & "x" & H as string
if file_name contains filter_string then
set the end of result_array to this_file
end if
end repeat
return result_array
on error error_message
display dialog error_message
end try
end run
的脚本Get Folder Contents
动作后运行。
结果数组有问题,但我找不出什么。 结果必须是名称中包含其大小的文件列表。
请详细解释一下。 – gadgetmo
我想''result_array'中的具体'this_file',但它没有工作。 – Phil