I have so many javascripts in InDesign, I wrote a script that lists them all so I can select from them. The problem is getting the "directory" javascript to call the selected javascript. How can one javascript in InDesign call another?
Asked
Active
Viewed 138 times
1 Answers
0
var main = function() {
var fo = Folder.selectDialog(),
jsxs, jsx,
fn = function(f) {
return /\.jsx?$/i.test ( f.name );
};
if ( !fo ) return;
jsxs = fo.getFiles ( fn );
while ( jsx = jsxs.pop() ) {
app.doScript ( jsx );
}
}
main();
You might need to introduce user interaction level to avoid pop up warnings.

Loic
- 2,173
- 10
- 13