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

Load action set via Script not working in CC2020

Explorer ,
Apr 13, 2020 Apr 13, 2020

Copy link to clipboard

Copied

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

Views

1.9K

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

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 ();

Votes

Translate

Translate
Adobe
Guide ,
Apr 14, 2020 Apr 14, 2020

Copy link to clipboard

Copied

Nothing. Everything works. 

Check if the file exists at the specified path.

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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 ();

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

LATEST

.

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