[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(DTPtechNote:935) illustrator CSでAppleScript別名保存



ができない。バグです。
どういうことかっていうと、保存すべきファイルが行方不明になるもよう。
touchコマンドでアップデートしてやるとうまくいきます。

tell application "Illustrator CS"
	activate
	set theFileReference to file path of current document
	set theFolderPath to my GetFolder(theFileReference)
	set myDocuPath to (theFolderPath & "Test.ai") as Unicode text
	display dialog myDocuPath
	do shell script "touch " & (quoted form of POSIX path of myDocuPath)
	
	save current document in file myDocuPath as Illustrator with options {class:Illustrator save options, compatibility:Illustrator 11, compressed:true, embed ICC profile:false, flatten output:preserve appearance, font subset threshold:100.0, PDF compatible:true}
	
	close current document saving no
end tell

on GetFolder(theFileReference)
	tell application "Finder"
		set FolderPath to (folder of theFileReference) as Unicode text
		return FolderPath
	end tell
end GetFolder