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

Load action set via Script not working in CC2020

Explorer ,
Apr 13, 2020 Apr 13, 2020

Hi, I would like some help here if it's possible. I have a script that loads a set of actions in Photoshop. Used to worked great in all version of Photoshop, except the latest. Here is the code: 

function loadActions () {
	
	app.load(new File(app.path+'/Presets/Actions/ActionsFolder/Actions.atn'));
};

loadActions ();

I repeat, this work in previous versions of Photoshop, but not in 2020. What changed?

TOPICS
Actions and scripting
2.1K
Translate
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

Guide , Apr 14, 2020 Apr 14, 2020

Make sure the file exists....

function loadActions () {
	var actionFile = new File(app.path+"/Presets/Actions/ActionsFolder/Actions.atn");
    if(!actionFile.exists){
        alert("Action file does not exist!");
        return;
        }else{ app.load(actionFile);}
};

loadActions ();
Translate
Adobe
Guide ,
Apr 14, 2020 Apr 14, 2020

Nothing. Everything works. 

Check if the file exists at the specified path.

Translate
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 ,
Apr 14, 2020 Apr 14, 2020

Just to make sure: Does the Folder »ActionsFolder« in the Folder »Actions« actually exist? 

Translate
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
Guide ,
Apr 14, 2020 Apr 14, 2020

Make sure the file exists....

function loadActions () {
	var actionFile = new File(app.path+"/Presets/Actions/ActionsFolder/Actions.atn");
    if(!actionFile.exists){
        alert("Action file does not exist!");
        return;
        }else{ app.load(actionFile);}
};

loadActions ();
Translate
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
Explorer ,
Apr 14, 2020 Apr 14, 2020

The problem was the wrong slash. Thank you all for your help!!!

Translate
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
Explorer ,
Apr 14, 2020 Apr 14, 2020
LATEST

.

Translate
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