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 ;
}
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.
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 */
Copy link to clipboard
Copied
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.