Removing need to manually click to approve saveAs

Community Beginner ,
Jun 13, 2021 Jun 13, 2021

Copy link to clipboard

Copied

I have a photoshop script thats working and does everything I need, except when I call the following in the last lines of my script:

 var saveLocation = File("/Users/user/Desktop/cats/catT1"+i+".jpg");
    var config = new JPEGSaveOptions();
    config.quality = 10;

    app.activeDocument.saveAs(saveLocation, config);

It opens the saveAs window for me to click Save, then once I have it opens a JPEG options window in which I need to click OK.

I want to run this script over many items and so really need a way to automate / eliminate the clicking...


Any help much appreciated - I've lost hours to this!!

TOPICS
Actions and scripting

Views

550

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Jun 13, 2021 Jun 13, 2021
yourPath = File('~/desktop/jpgFile'); (jpg = new JPEGSaveOptions).quality = 12 activeDocument.saveAs(yourPath, jpg, true)

Likes

Translate

Translate
Adobe Community Professional ,
Jun 13, 2021 Jun 13, 2021

Copy link to clipboard

Copied

 

yourPath = File('~/desktop/jpgFile');
(jpg = new JPEGSaveOptions).quality = 12
activeDocument.saveAs(yourPath, jpg, true)

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 13, 2021 Jun 13, 2021

Copy link to clipboard

Copied

LATEST

Man you just saved me 20,000 clicks. I love you 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 13, 2021 Jun 13, 2021

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines