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

Script not worked in Photoshop

Participant ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

Hi !

My script is worked in  ExtendScript Toolkit, but doesn't worked in PS SC6 via export from Configurator 3. What is problem ?

#target photoshop;

var mainFolder = "~/testFolder";

var PrinterFolder = mainFolder  + '/printer';

var myFoldersArray  =[];

var content = [];

myFoldersArray = readFolder(this.PrinterFolder);

alert(myFoldersArray );

function readFolder(folderName){//----------------------------------------------------------------------------------------------------

myFolder = new Folder(folderName);

myFoldersArray  =[];

myFoldersArray = myFolder.getFiles( function( file ) { return file instanceof  Folder} );

return myFoldersArray  ;

}

TOPICS
Actions and scripting

Views

533

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

Participant , May 10, 2013 May 10, 2013

Not right, I'm used this markers in other parts of scripts- all worked. I'm thing what mistake (are marked):

var myFoldersArray =[];

myFoldersArray = readFolder(this.PrinterFolder);

function readFolder(folderName, newName){//----------------------------

myFoldersArray =[];

}

I'm change name of the array myFoldersArray1 in the function and delete link "this" - script are worked.

Votes

Translate

Translate
Adobe
Valorous Hero ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

There are various ways of using a script with configurator. I am guessing you have pasted in the code, if so the problem could be the comment //----------

Remove the comment or make sure coments are in the form of /* this is a comment */

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
Participant ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

LATEST

Not right, I'm used this markers in other parts of scripts- all worked. I'm thing what mistake (are marked):

var myFoldersArray =[];

myFoldersArray = readFolder(this.PrinterFolder);

function readFolder(folderName, newName){//----------------------------

myFoldersArray =[];

}

I'm change name of the array myFoldersArray1 in the function and delete link "this" - script are worked.

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