What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

PS Scripts : Javascripting and functions


bungdaddy

Member
Messages
6
Likes
0
I am new to PS scripting and trying to create a basic script to gather folder paths and then remove the path of that folder. I have created a basic array and while trying to
Code:
var v = labs[i].substring(labs[i].lastIndexOf("/")+1);
ESTK throws an error that "labs.substring is not a function." This seems to be valid javascript, does ESTK require a different syntax or something?

Thanks

Code:
#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);
  
}
 

Back
Top