4 Replies Latest reply on Aug 8, 2013 3:55 AM by Vamitul

    Split extension and count


      Hi Forum,


      I tried with the below script to alert if the document links names are more than 7 characters.


      Unluckily the extension also added together in count and alerted if matched..


      I do want to OMIT exension .jpg or .tif or .eps or whatever extension is and to count only the link name and alert if exceed more than 7 characters.


      for eg. Should alert if link name is more than 7 characters excluding extension.








      links= app.activeDocument.links.everyItem().getElements();

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

          if(links[i].name.split("").length>7) {

              alert ("links names are more than 7 characters)



      thanks so much forum...