【发布时间】:2017-04-22 12:40:59
【问题描述】:
在 BBEdit 中,Markup -> Check -> Document Links 快捷方式 cmd+control+k 下的命令可以检查所有链接。当我查看BBEdit > HTML Scripting -> check links 下的字典时,它显示:
但是当我尝试使用以下项目编写脚本时:
set theResult to check links of active document of project window 1
当我尝试根据以下文件名进行检查时,我收到错误 item:
set foobar to (name of active document of project window 1) as string
set theResult to check links of foobar
如果我尝试,我仍然会遇到同样的错误:
set projectPath to file of project document 1
set theResult to check links of projectPath
我收到了{} 的回复。认为这是不添加 with show results 的问题,我将其更改为:
set theResult to check links of projectPath with show results
但我得到了activate的返回
当我通过 Google 搜索时,我无法找到一个解决方案,即是否可以返回一个布尔值,即 HTML 文件中的链接在通过内容编写脚本时是否有效。所以我的问题是,我怎样才能让 AppleScript 告诉我链接在 BBEdit 中使用check links 是有效的?
【问题讨论】:
标签: html file applescript bbedit