Copy link to clipboard
Copied
http://forums.adobe.com/message/5167443#5167443
Someone suggested that I cross post this to see if there is an easy scripting solution to my dilemma. See post link above.
Give it a try
...#target Indesign
var toSearch = 'example.ai' //to edit: name of the ai to work on
//select a folder with inddFiles
var selFolder = Folder.selectDialog();
if(!selFolder) {exit();};
var allInddFiles = selFolder.getFiles('*.indd');
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
for(var i = 0; i < allInddFiles.length; i++)
{
currItem = allInddFiles;
var currDoc = app.open(currItem);
changeAI(currDoc);
}
app.scriptPreferences.userInteractionLevel = UserInteract
Copy link to clipboard
Copied
Give it a try
#target Indesign
var toSearch = 'example.ai' //to edit: name of the ai to work on
//select a folder with inddFiles
var selFolder = Folder.selectDialog();
if(!selFolder) {exit();};
var allInddFiles = selFolder.getFiles('*.indd');
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
for(var i = 0; i < allInddFiles.length; i++)
{
currItem = allInddFiles;
var currDoc = app.open(currItem);
changeAI(currDoc);
}
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
function changeAI(docRef)
{
var currGraphics = docRef.allGraphics;
l = currGraphics.length;
while(l--){
currGraphic = currGraphics
; var currName = currGraphic.itemLink.name;
if(currName == toSearch){
currGraphic.horizontalScale = 30;
currGraphic.verticalScale = 30;
currGraphic.parent.fit(FitOptions.FRAME_TO_CONTENT)
}
}
currDoc.close(SaveOptions.YES);
}
Copy link to clipboard
Copied
You, my friend, are a life saver! Thanks so much, Hans.