質問

I am making a wizard style script for people to quickly create formulaic slide images from text data files, I have two scripts one to create the images(as layers) from data and one to export the images as PNGs. to make this simple as possible for the user I'd like it to export all data and images into the same folder, so far I've manually saved the psd into the directory that I have the other data files and have the exporter check to see if the document is saved() and if it is to saveAs() all the images to the same directory, if not it throws a message alerting the user to save the document.

However this intermittent saving is not ideal, because the user must navigate twice to the same folder if they want to save the images in the same place, so I thought I'd make the slide creator script save the presave document before the user has the opportunity to make edits that way when they go to save their changes it will default to the same folder as the text data file.

the problem: when I run the script the saveAs works, saves a file, but then going to the export script it throws a message that the document hasn't been saved. Sure enough I look at the title tab and it doesn't have my filename and still has an * beside it

役に立ちましたか?

解決

"Save As" normally saves a copy without affecting the original document. Try setting the asCopy parameter of the saveAs() method to false.

他のヒント

Thank you, nullability, it was the asCopy parameter that I was over looking in the documentation.

The asCopy parameter was set to true. My bad :(

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top