Run these scripts silently
I use a script for Illustrator and Photoshop that does what I want. One thing I would like to avoid is the focusing of the app when it executes. It would be optimum if the programs (Illustrator and Photoshop) could stay hidden. To be clear the programs are open, however, I do not want them to take focus when the script runs. The way it works now they do. They jump to the forefront of what I am doing. Is there any way to do this? Thanks
Illustrator script:
var dest = new File("C:/PSUtil/new1.jpg");
function exportFileToJPEG (dest) {
if ( app.documents.length > 0 ) {
var exportOptions = new ExportOptionsJPEG();
var type = ExportType.JPEG;
var fileSpec = new File(dest);
exportOptions.antiAliasing = false;
exportOptions.qualitySetting = 70;
exportOptions.artBoardClipping = true;
app.activeDocument.exportFile( fileSpec, type, exportOptions );
}
}
exportFileToJPEG (dest);Photoshop script:
var saveFile = File("C:/PSUtil/new2.png");
sfwPNG24(saveFile);
function sfwPNG24(saveFile){
var pngOpts = new ExportOptionsSaveForWeb;
pngOpts.format = SaveDocumentType.PNG;
pngOpts.PNG8 = true;
pngOpts.transparency = true;
pngOpts.interlaced = false;
pngOpts.quality = 100;
activeDocument.exportDocument(saveFile,ExportType.SAVEFORWEB,pngOpts);
}