1
在AppleScript的,我知道如何做一个典型的找到类似: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
但我想返回找到多结果,并将其保存到一个文件中,所以我想我需要将其保存到记录或列表,然后通过输入重复,但是当我尝试:
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
我得到的错误:
没有结果从这个表达式的某些部分被退回。
为什么找不到记录或列表?有没有一种方法可以设置多文件搜索的功能?