• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Running an action via scripting with options

Engaged ,
Jan 08, 2024 Jan 08, 2024

Copy link to clipboard

Copied

Hi. Out of interest I'm trying to set some options when running an action via a script, specifically suppressing the action dialog via script. - Not displayDialogs = DialogModes.NO

 

var theFiles = ["D:\\temp\\jp.jpg"];

// MAIN SCRIPT CODE TO DO STUFF...
var act = "make_layer"
var actset = "my_action_set";

var batchOptions = new BatchOptions();
batchOptions.overrideOpen = false;
batchOptions.overrideSave = false;

// app.doAction(act, actset);
app.batch (theFiles, act, actset, batchOptions)

 

I get the error illegal argument on app.batch (theFiles, act, actset, batchOptions);  - not very helpful. Not sure where I'm going wrong as 

app.doAction(act, actset);

 works fine.

 

Any ideas??

 

TOPICS
Actions and scripting

Views

133

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

Community Expert , Jan 08, 2024 Jan 08, 2024

A String is not directly a File, please try 

var theFiles = [File("D:\\temp\\jp.jpg")];

 

Votes

Translate

Translate
Adobe
Community Expert ,
Jan 08, 2024 Jan 08, 2024

Copy link to clipboard

Copied

A String is not directly a File, please try 

var theFiles = [File("D:\\temp\\jp.jpg")];

 

Votes

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
Engaged ,
Jan 08, 2024 Jan 08, 2024

Copy link to clipboard

Copied

D'oh! Thank, man.

 

 

Votes

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 Expert ,
Jan 08, 2024 Jan 08, 2024

Copy link to clipboard

Copied

LATEST

I have seen this in the documentation, however, I don't recall seeing any scripts using Batch before!

 

EDIT:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-run-photoshop-batch-via-javasc...

Votes

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