title: How to Call Javascript to c#
body: <p>How to run javascript file in c#
  I have tried ....How to call c# method from js functionHow to call c# method from js functionHow to call c# method from js functionHow to call c# method from js functionHow to call c# method from js functionHow to call c# method from js functionHow to call c# method from js functionHow to call c# method from js functionHow to call c# method from js functionHow to call c# method from js function</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>   function SavePSD(saveFile){
          psdSaveOptions = new PhotoshopSaveOptions();
          psdSaveOptions.embedColorProfile = true;
          psdSaveOptions.alphaChannels = true; 
          activeDocument.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
          }
   
   
      function OutFoldPSD(dname){
          var outfolder = new Folder("D:/Daimond Classic/Saved/")
             if (outfolder.exists == false){
                  outfolder.create();
                  var saveFile = new File(outfolder + "/" + dname +".psd");
                   SavePSD(saveFile);}
             else{
                 var saveFile = new File(outfolder + "/" + dname +".psd");
                 SavePSD(saveFile);}
                      }
      &lt;script type="text/javascript" language="javascript"&gt;
      function Func() {
          alert("Save Complete!")
      }</code></pre>
  </div>
  </div>
  </p>