javascript's "do script" documentation for Aia no gui
Hi,
I'm leeching Adobe's and Stack Exchange's forums, but I can't find any recent post about this specific command:
app.executeMenuCommand('ai_browse_for_script');
I want to run a action script on a batch of files without User Interaction, only jsx file - So this CMD needs more parameters like PATH and NODISPLAY. NB: this cmd showed up since CS6
It is not in guides CS6 nor CC2017 (we already knew that) So it's not present into Jongware's fantastic CHM reference guide; The best guide about menuExecCMD I've found so far is http://chuwa.iobb.net/tech/illustrator-cc2014-menu-comman.html
Maybe noone is using this which I highly doubt; the only documented workaround seems to doscript from VB which is something I could do, but I was focusing JSX for now.
So I will run something like this:
#target Illustrator-21
#targetengine main
var scriptID = "test-doscript v0.0";
var sourceFolder1 = null;
var fileType = null;
var files1 = null;
var sourceFolder1 = Folder ("C:/TEMPai/F1");
var fileType = "*.pdf";
var originalInteractionLevel = userInteractionLevel;
userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;files1 = new Array();
files1 = sourceFolder1.getFiles( fileType );
if ( files1.length != 0 ){
for ( i = 0; i < files1.length; i++ ){
var sourceDoc1 = app.open(files1);
app.executeMenuCommand('ai_browse_for_script');
}
}
I'm looking for the equivalent of this - NB: I don't car about errors as I debug them myself. I doing things 1 by 1, nowadays I [think to] know what I'm doing.
Thank you for your time, maybe my google-fu is stuck. Overall this is very important to have a complete control about what illustrator do, because I can manage keeping ram usage low with the For {} loop, indeed I can't save save my work until the otherwise I'll loose hours a day waiting Ai to save files
Possible workaround? Could I copy paste aia into jsx file? https://gist.github.com/moluapple/2568405
EDIT: app.executeMenuCommand('ai_browse_for_script';script1); is not syntax-correct
EDIT2 app.executeMenuCommand('ai_browse_for_script') is requesting vb or jsx file extension only
Image: This is the screen I want to get rid off keeping the same idea, instead there I will make the batch myself

Message was edited by: et3d Updated edit
