• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Need to global find and scale and resize frame on a linked graphic

Guest
Mar 21, 2013 Mar 21, 2013

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.

TOPICS
Scripting

Views

557

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Mar 21, 2013 Mar 21, 2013

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

...

Votes

Translate

Translate
Enthusiast ,
Mar 21, 2013 Mar 21, 2013

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);

        }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 21, 2013 Mar 21, 2013

Copy link to clipboard

Copied

LATEST

You, my friend, are a life saver!  Thanks so much, Hans.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines