Saving without dialog window

前端 未结 3 2002
死守一世寂寞
死守一世寂寞 2021-01-27 06:26

I\'m trying to write a script that will automate a bunch of stuff for Photoshop CS5. Part of this involves saving a bunch of files. Is there a way to save a file in a way that d

3条回答
  •  我在风中等你
    2021-01-27 06:43

    Try using Document.saveAs(). But, like El Cas said, you still have to pass in some kind of SaveOptions object. You don't necessarily have to specify all the options if you don't want. You can just use the generic object like this:

    app.activeDocument.saveAs(new File(doc.path + "/myDocument"), TiffSaveOptions);
    // or BMPSaveOptions or GIFSaveOptions or JPEGSaveOptions...
    

    Here's a much more complete Photoshop CS5 Javascript Reference

提交回复
热议问题