AppleScript to open";“最近开放”;文件
可以用AppleScript打开最近的文件吗? 我尝试了下面的脚本,但不起作用AppleScript to open";“最近开放”;文件,applescript,Applescript,可以用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
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来自«类menE»类menI»类menI»类menI»类Apri»类recente»类menE»类Archivio«类mbri»类Archivio»类prcs»AppleScript Editor»1的«类menI»类menI»测试
当“Apri-recente”子菜单打开时,这似乎是一个错误。 但这不是必需的,您可以单击一下即可完成
tell application "System Events"
tell (get first process whose frontmost is true)
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
end tell
end tell
当“Apri-recente”子菜单打开时,这似乎是一个错误。 但这不是必需的,您可以单击一下即可完成
tell application "System Events"
tell (get first process whose frontmost is true)
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
end tell
end tell