Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.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 Illustrator CC 2020 Apple脚本(弹出“选择文件格式”)_Applescript_Adobe Illustrator - Fatal编程技术网

Applescript Illustrator CC 2020 Apple脚本(弹出“选择文件格式”)

Applescript Illustrator CC 2020 Apple脚本(弹出“选择文件格式”),applescript,adobe-illustrator,Applescript,Adobe Illustrator,自从我在apple脚本中执行此命令时,将illustrator更新为CC 2020(24.0) set placedRef to make new placed item in layer "Layer1" of current document with properties {file path:pfilepath} without dialogs Illustrator正在显示一个弹出窗口:“选择要打开文件的文件格式:”有3个选项:Pixar、PNG或Targa。 无论我选择什么,都不会

自从我在apple脚本中执行此命令时,将illustrator更新为CC 2020(24.0)

set placedRef to make new placed item in layer "Layer1" of current document with properties {file path:pfilepath} without dialogs
Illustrator正在显示一个弹出窗口:“选择要打开文件的文件格式:”有3个选项:Pixar、PNG或Targa。 无论我选择什么,都不会插入任何内容

此命令与illustrator CC 2019上的命令完全相同,不会显示弹出窗口

以下是要复制的完整代码:

on run argv
    tell application "Adobe Illustrator"
        activate
        set user interaction level to never interact
        set placedRef to make new placed item in layer "ignore" of current document with properties {file path:item 1 of argv} without dialogs
    end tell
end run
运行脚本的命令示例:

osascript test.scpt :Users:myusername:Download:test.pdf

AI 2020已将
文件路径
属性的类型从“file”值更改为POSIX路径字符串,从而破坏了与现有脚本的兼容性()。将shell脚本改为传递POSIX路径