What are the real possibilities of loading an action.atn file in the Action palette with UXP?

require("photoshop").action.validateReference({_ref: "ActionSet", _name: "myActionsSet"})

Everything was resolved with correction of an error in writing the reference:
I changed this:

_ref: "ActionSet"

Per:

_ref: "actionSet"

Thank you very much once again!
If anyone needs this, here’s the code working with existing atn verification!

async function importAtnFiles() {
      const fs = require('uxp').storage.localFileSystem;
      const action = require("photoshop").action;
      const atnFile = await fs.getFileForOpening({ types: ["atn"] });
      const ActionSetName = action.validateReference({_ref: "actionSet", _name: atnFile.name.match(/(.*)\.[^\.]+$/)[1]})
      if(ActionSetName == true){app.showAlert(`"${atnFile.name}" has already been loaded!`)}
      else{app.open(atnFile);}
}
importAtnFiles()
4 Likes