2 Replies Latest reply on May 10, 2013 10:59 AM by Andy_Bat1

    Script not worked in Photoshop

    Andy_Bat1 Level 1

      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  ;
        • 1. Re: Script not worked in Photoshop
          Paul Riggott Level 6

          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 */

          • 2. Re: Script not worked in Photoshop
            Andy_Bat1 Level 1

            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.