我尝试了下面的代码
activate application "Adobe Reader"
tell application "System Events"
tell process "Adobe Reader"
set currentFile to active Document
end tell
end tell但是我无法获取活动文档的名称,我已经用打开的文档尝试了这段代码。我甚至在脚本编辑器中找不到任何适用于adobe阅读器的字典。如有任何建议,我们将不胜感激
发布于 2020-04-28 04:11:41
这里有几个可能对你有用的AppleScript选项。我没有Adobe Reader,所以我无法测试代码。
tell application "Adobe Reader" to set currentFile to name of document 1如果这对你不起作用,你可以试试这个…
tell application "Adobe Reader" to activate
repeat until application ""Adobe Reader" is frontmost
delay 0.1
end repeat
tell application (path to frontmost application as text) to set currentFile to name of document 1https://stackoverflow.com/questions/61463822
复制相似问题