2 Replies Latest reply on Mar 2, 2012 11:20 AM by dazaweb

    Javascript functions and Extendedscript -- newbie help


      I am new to the Photoshop scripting world and starting with a basic script to gather folder names and then remove the path. When I use the code below ESTK throws an error that labs[i].substring is not a function. That I know, it's not...but it is valid javascript. Need an explanation please.




      #target photoshop

      //Sizes Tab

      //Lab Drop-down menu

      var labSets = Folder('~/Desktop/Template Hub/');

      var labSets = labSets.getFiles();



      //Create Array containing Lab names from folder names

      var labs = labSets;

      for (i=0; i<labs.length; i++) {

          var v = labs[i].substring(labs[i].lastIndexOf("/")+1);