Copy link to clipboard
Copied
I' trying to save a file using
app.activeDocument.saveAs(savepath);
and i am doing it in a loop on multiple files, but every time it will just show save as window and i have to do it manually.
Any ideas how to ignore that save as window ?
Copy link to clipboard
Copied
Did you try setting the Application.userInteractionLevel to DONTDISPLAYALERTS at the start of your script and set it back at the end?
Copy link to clipboard
Copied
Like this ? :
var originalInteractionLevel = app.userInteractionLevel;
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
.
.
.
app.userInteractionLevel = originalInteractionLevel;
^ this is not working
Copy link to clipboard
Copied
and is your variable… savepath a valid File Object…? Have you tried passing options settings…?
Copy link to clipboard
Copied
yes, i tried that. can it be a CC problem ?
Copy link to clipboard
Copied
Im sorry but the only way you can determine that is to distribute and see for yourself… Nobody from Adobe posts here…
Im NOT a CC user so I can't help you further… Everything suggested here should work…!!
Copy link to clipboard
Copied
you're trying to save to a Server folder, right?
show us how you're constructing savepath
Copy link to clipboard
Copied
for(var i = 0; i < parentFolder.length ; i++)
{
// get design name
var nameF = new String(parentFolder);
var nameD= nameF.slice(-4);
var source = new File(parentFolder+"/"+nameD+".ai");
open(source);
unhideAndSelectLayers(app.activeDocument);
copy();
open(oznamko_A6);
paste();
var save_oznamko_A6 = new File(parentFolder+"/"+nameD+"_oznamko_A6.ai");
app.activeDocument.saveAs(save_oznamko_A6);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
}
Copy link to clipboard
Copied
you didn't post where you're getting your source folder from...if you're using open dialog and you're in Lion OS, check post # 8 in this thread for a possible solution