1

我从事平面设计工作,想为 indesign 创建一个脚本,它会自动:

  1. 打开指定的文档模板。
  2. 创建一个新的项目文件夹。
  3. 使用剪贴板中的文本命名该文件夹。
  4. 将新打开的文档保存到新创建的文件夹中,并使用剪贴板中的相同文本命名该文档。

我对 Applescript 很陌生,所以打字很慢,用小词,这样我就能理解。

到目前为止,这是我提出的代码方式:

tell application "Adobe InDesign CS5"
set myDocument to open "cm:Graphic_Design:Design Studio Templates:Brochure_042012_001:Brochure_042012_001.indt"
end tell
tell application "Finder"
make new folder at folder "Work" of folder "Graphic_Design" of disk "cm" with properties {name:"untitled folder"}
set name of folder "untitled folder" of folder "Work" of folder "Graphic_Design" of disk "cm" to pbpaste
end tell
4

1 回答 1

0

尝试:

tell application "Finder" to set newFolder to make new folder at "cm:Graphic_Design:Work" with properties {name:(the clipboard as text)}
tell application "Adobe InDesign CS5"
    tell active document to save saving in (newFolder as text)
    end tell
于 2012-10-24T21:41:39.770 回答