title: How I can save file with script Photoshop?
body: <p>I want to write a script that would substitute different text from a text file into my shalon and save the image in jpeg format.</p>
  <p>An error occurs: &quot;This function may not be available in this version of Photoshop&quot; on this line:</p>
  <pre><code>activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);
  </code></pre>
  <p>My code:</p>
  <pre><code>while(!myFile.eof)
  {
  line = myFile.readln();
  createText(line);
  
  var thistimestamp = Math.round(new Date().getTime() / 1000);
  saveFile = new File( &quot;/c/Users/marki/Desktop/Temp001/&quot; +thistimestamp)
  saveOptions = new JPEGSaveOptions();
  saveOptions.embedColorProfile = true;
  saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
  saveOptions.matte = MatteType.NONE;
  saveOptions.quality = 9;
  app.activeDocument.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
  }
  </code></pre>
  <p>I use Adobe Photoshop: 2017.0.0 20161012.r.53 2016/10/12:23:00:00 CL 1094006 ( x64)</p>