如何在同一文件夹中保存文件applescript

如何在同一文件夹中保存文件applescript,applescript,automator,adobe-illustrator,Applescript,Automator,Adobe Illustrator,我正在尝试使用automator运行applescript,以新名称将illustrator文件保存在其本机文件夹中。我的applescript对此有什么帮助吗?必须声明一个路径 on run {input, parameters} tell application "Adobe Illustrator" set allMyItems to every path item of current document whose fill color is {cyan:0.0, magen

我正在尝试使用automator运行applescript,以新名称将illustrator文件保存在其本机文件夹中。我的applescript对此有什么帮助吗?必须声明一个路径

on run {input, parameters}
  tell application "Adobe Illustrator"
    set allMyItems to every path item of current document whose fill color is {cyan:0.0, magenta:0.0, yellow:0.0 black:100.0}
    repeat with myItem in allMyItems
      set fill color of myItem to {cyan:0.0, magenta:0.0, yellow:0.0 black:0.0}
    end repeat
    set theDestination to path to parentfolder
    save current document as eps
    close current document
  end tell
  return input
end run

请不要提供您代码的截图或截图链接。编辑您的问题,将代码作为文本包含在内。您需要在每行代码前放置四个空格,以便正确格式化。我已经为您完成了这项工作。它是在automator中正确格式化的,我还添加了在结束重复后将Destination设置为path to parentfolder。但仍然在寻找一条路。有什么想法吗?请不要提供您代码的截图或截图链接。编辑您的问题,将代码作为文本包含在内。您需要在每行代码前放置四个空格,以便正确格式化。我已经为您完成了这项工作。它是在automator中正确格式化的,我还添加了在结束重复后将Destination设置为path to parentfolder。但仍然在寻找一条路。有什么想法吗?