是否可以使用 AppleScript 打开最近的文件?我尝试了以下脚本,但它不起作用。
on run
try
tell application "System Events"
set theApp to (get name of first process whose frontmost is true)
click menu bar item "Archivio" of menu bar 1 of process theApp
click menu item "Apri recente" of menu "Archivio" of menu bar item "Archivio" of menu bar 1 of process theApp
click menu item " test" of menu "Apri recente" of menu item "Apri recente" of menu "Archivio" of menu bar item "Archivio" of menu bar 1 of process theApp
end tell
end try
end run
错误是
--> 错误号 -1728 来自 «class menE» 的 «class menE» 的 "test" «class menI» 的 "Apri recente" «class menE» 的 "Archivio" «class mbri» 的 "Archivio" «class mbar» 1 of «class prc» "AppleScript Editor"