[Photoshop JSX] Persistent Issue: Unable to Delete Action Sets from Script (Duplicates)
Hello everyone,
I'm seeking help with a persistent issue regarding Photoshop automation via JSX scripting.
My goal: To load an .atn file (action set) into the Actions panel, run an action, and then save a PSD file. To avoid duplicates in the Actions panel, I need to delete the pre-existing action set (specifically action_set_atn) before reloading it.
The problem: Despite numerous attempts, I'm unable to reliably delete the action set action_set_atn using a JSX script. Every time the script runs, a new duplicate of the action set is created in Photoshop's Actions panel.
Photoshop Version: Adobe Photoshop 26.7.0
What I've tried (and failed):
- app.unload("action_set_atn"): The standard high-level command. It doesn't remove duplicates.
- executeAction commands for deletion (ID: "Dlt "): I've tried various configurations of this low-level command, attempting to target the set by name and by index.
- executeAction command to reset all action sets (ID: "Rset"): Even this drastic operation, which should theoretically clear all sets, didn't prevent duplicate creation upon subsequent loading.
- Adding delays ($.sleep()) and history management: I've tried introducing pauses for synchronization and suspending/resuming history to avoid conflicts.
- Log analysis: Debugging logs showed that executeAction commands for "Make" (creating) an action set fail with the error "The command 'Make' is not currently available." This suggests a fundamental limitation in the script's execution context.
Context:
My script runs Photoshop in an automated environment (launched via command line).
The question:
Is there a 100% reliable way to delete a specific action set (action_set_atn) from a JSX script in this automation context? Or is the limitation on action set manipulation (creation/deletion) via scripting in headless environments an expected behavior?
Any insights or workarounds would be greatly appreciated.
Thanks!
