Applescript简单打开保存文件片段?

Applescript简单打开保存文件片段?,applescript,Applescript,我只需要一个片段来打开并保存一个文件。这是一个带有链接艺术品的illustrator PDF,问题是链接文件不会更新,除非我打开然后保存文件,我不得不这么做很多次,这让我的大脑爆炸。应该很简单。我在MacOSX10.6.8上的IllustratorCS3(13.0.2)中测试了以下代码片段 set theFiles to choose file with prompt "Select the files" of type {"pdf"} with multiple selections allo

我只需要一个片段来打开并保存一个文件。这是一个带有链接艺术品的illustrator PDF,问题是链接文件不会更新,除非我打开然后保存文件,我不得不这么做很多次,这让我的大脑爆炸。

应该很简单。我在MacOSX10.6.8上的IllustratorCS3(13.0.2)中测试了以下代码片段

set theFiles to choose file with prompt "Select the files" of type {"pdf"} with multiple selections allowed

tell application "Adobe Illustrator"
    repeat with theFile in theFiles
        open theFile without dialogs
        save current document in theFile as pdf
    end repeat
end tell
choosefile
命令(提示用户查找一个或多个文件)只是获取文件列表的一种方法。你也可以用

告诉应用程序“Finder”设置文件夹“Macintosh HD:Full:Path:to:Your:folder”的每个文档文件的文件,该文件夹的文件类型以“pdf”开头。


如果你想把所有的PDF文件都放在一个特定的文件夹中。

我想再精确一点就好了。也许写出伪代码会有所帮助