7 Replies Latest reply on Jan 29, 2010 2:44 PM by Yuliaart

    lastIndexOf ("/") InDesign CS4 JavaScript

    Yuliaart Level 1



      I need lastIndexOf ("/") of myDocPath, but the line gives me error all the time. Is it because of '/', but shouldn't it be perceived as a string since it's in the double quotes. Here is my script:


      var myDoc = app.activeDocument;
      var myDocPath = myDoc.path;
      var myFolderSplit = myDocPath.lastIndexOf ("/")


      and it brakes at the green line. How can I get around it.


      Thank you very much for your help.