2016-08-21 60 views
0

我正在嘗試製作一個腳本,用於打開文件夾中的所有InDesign文件並對其進行編輯。AppleScript打開文件夾中的所有InDesign文件

目前試圖打開文件,這裏是我有:

tell application "Adobe InDesign CC 2015" 
    open (every file of folder "test1" whose name ends with ".indd") 
end tell 

但我得到一個錯誤snytax:

Expected 「,」 but found 「"」. 

回答

3

InDesign完全不知道文件和文件夾是什麼。

只有Finder(和System Events)有關於文件系統

tell application "Finder" to set indesignFiles to (files of folder "test1" whose name extension is "indd") as alias list 

tell application "Adobe InDesign CC 2015" 
    open indesignFiles 
end tell 

考慮的是,在Finder文件夾test1是桌面文件夾的子文件夾的知識。

+0

作品非常感謝它! – Matt

3

InDesign不明白 「文件夾中的所有文件」。您正在使用的表達方式是您要對Finder說的內容。

相關問題