1 Reply Latest reply on Feb 11, 2013 4:53 PM by jkinsman

    Error with doScript

    jkinsman

      Working in IND 3 here.

       

      I am trying to call a script from an event within a startup script but I keep running into this error.

       

      It says it is exprecting a ;  on the line where the doscript method is called.

       

      Here is what I have:

       

      var scriptPath = new File(app.fullName);

      // had to use app.fullName above as this is running from startup scripts

       

      var sPath = scriptPath.path + "Scripts/Scripts%20Panel/myScript.jsx";

      var runPath = new File(sPath);

      app.doScript(runPath, ScriptLanguage.javascript);

       

      Any ideas why I am getting this error?

        • 1. Re: Error with doScript
          jkinsman Level 1

          Reply to my own post. The above was a simple problem. I was missing a forward slash at the end of my scripPath variable.

           

           

          var sPath = scriptPath.path + "Scripts/Scripts%20Panel/myScript.jsx";

           

          Should have been

           

           

          var sPath = scriptPath.path + "/Scripts/Scripts%20Panel/myScript.jsx";