Photoshop: Scripting: JavaScript app.batch method ignores specified Action Set. Problem in case of Action name duplicated at other Action Set

  • 1
  • Problem
  • Updated 5 months ago
  • Acknowledged
  • (Edited)
Scenario: Create set "Set1", then another set "Set2". Record different actions in both of sets but use the same name for the action "MyAction". When you run Application.batch command via code - Photoshop always run "MyAction" from the first set (Set1) regardles if code requested to pick action from Set2.
In Documentation of PhotoShop JavaScript reference for Application.batch() it is written that it expects 4 arguments: batch(inputFiles, action, from [, options]). The "from" argument is set to "Set2" but script always run  "MyAction" from the first available set having the action labeled as requested in action argument ("Set1" int that case). InputFiles and optional options are set properly and they works as expected, the only problem is the inability to control the parent set if batch is ran via code.

Is this fixable?
Thank you.
Photo of Krasbit Jarosław Kraska

Krasbit Jarosław Kraska

  • 5 Posts
  • 0 Reply Likes

Posted 5 months ago

  • 1
Photo of Eric Ching

Eric Ching, Employee

  • 86 Posts
  • 46 Reply Likes
Official Response

I can reproduce this (as far back as CS6 too). I've logged a bug. In the meantime, one possible workaround is to drag the set with the intended action above any others with the same name in the actions panel. It appears to run the first instance of the action with the name specified in the batch call. 

Thanks for the report!