在 AppleScript 中,我知道如何通过以下方式进行典型查找:
tell application "BBEdit"
activate
open find window
find "memberFunction\\(\\)" searching in text 1 of text document "theFile" options {search mode:grep, wrap around:true} with selecting match
end tell
我可以进行多文件搜索查找:
tell application "BBEdit"
activate
find "memberFunction\\(\\)" searching in {file "path:to:project.bbprojectd:"} options {search mode:grep, showing results:true}
end tell
但我想返回 find multi 结果并将其保存到文件中,所以我想我需要将其保存到记录或列表中,然后重复输入,但是当我尝试时:
tell application "BBEdit"
activate
set findFunction to {}
set findFunction to {find "memberFunction\\(\\)" searching in {file "path:to:project.bbprojectd:"} options {search mode:grep, showing results:true}} as list
end tell
或者:
set findFunction to {find "memberFunction\\(\\)" searching in {file "path:to:project.bbprojectd:"} options {search mode:grep, showing results:true}} as record
我收到以下错误:
此表达式的某些部分未返回任何结果。
为什么没有将查找设置到记录或列表中?有没有办法可以设置多文件搜索的功能?