Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
AppleScript to open";“最近开放”;文件_Applescript - Fatal编程技术网

AppleScript to open";“最近开放”;文件

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

可以用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来自«类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