Skip to main content
Known Participant
May 22, 2014
Question

KeyTerm pickup

  • May 22, 2014
  • 1 reply
  • 740 views

Dear Friends,

I need keyterm definition placed in stub column

My requirement is:

1. Multiple keyterms placed in one box

2. Each keytem placed in each box

Input file:

My Requirements:

1. Multiple Keyterm definition placed in one box





This is urget requiremnt kindly help me.


Thanks

kanaga kumar. k












This topic has been closed for replies.

1 reply

Known Participant
May 23, 2014

Dear Friends,

I tried the below mentioned script but it is quit for Indesign. Kindly help in this regard.

Kindly see my requirement for above:

-----------

var myDoc = app.documents[0]; 

 

var myLib = app.libraries[0]; 

 

app.findTextPreferences = NothingEnum.nothing; 

app.changeTextPreferences = NothingEnum.nothing; 

 

app.findTextPreferences = null; 

 

app.findTextPreferences.appliedParagraphStyles= "KTHD" "KTDEF"; 

 

myFind = myDoc.findText(true); 

 

var myCount=0; 

 

    for (var i=0; i<myFind.length; i++)   

    {   

        var myPara = myFind.texts[0];   

        myText = myLib.assets.item ("ANNO").placeAsset (myFind.insertionPoints[-1])[0];   

        myPara.move(LocationOptions.AT_END, myText.insertionPoints[-1]);   

        myText.appliedObjectStyle = myDoc.objectStyles.item ("Object Styles");   

        myText.fit(FitOptions.frameToContent);   

        myCount++;   

    }   

 

 

alert(myCount+" ANNOs are Placed Successfully..."); 

----------------

Thanks

kanaga kumar.k

Inspiring
May 23, 2014

HI,

try this one, its may help to you

app.findTextPreferences = null; 

app.findTextPreferences.appliedParagraphStyle = "KTHD"; 

 

var 

  mFound = app.activeDocument.findText(), 

  len = mFound.length, 

  currWidth, tarText, tarIP, currFrame, currGB, 

  old_VOrigin = app.activeDocument.viewPreferences.verticalMeasurementUnits, 

  old_HOrigin = app.activeDocument.viewPreferences.horizontalMeasurementUnits; 

 

app.activeDocument.viewPreferences.horizontalMeasurementUnits = app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.POINTS; 

 

while (len-->0) { 

  tarText = mFound[len]; 

  currWidth = tarText.lines[0].endHorizontalOffset - tarText.lines[0].horizontalOffset + 10; 

  tarIP = tarText.insertionPoints[-1]; 

  currFrame = tarIP.textFrames.add(); 

  setFrame (currFrame); 

  currGB = currFrame.geometricBounds; 

  currGB = [currGB[0], currGB[3] - currWidth, currGB[2], currGB[3]]; 

  currFrame.geometricBounds = currGB; 

  tarText.texts[0].move(LocationOptions.AFTER,currFrame.texts[0]); 

  currFrame.parentStory.characters[-1].remove(); 

  currFrame.fit(FitOptions.FRAME_TO_CONTENT); 

  } 

app.activeDocument.viewPreferences.horizontalMeasurementUnits = old_HOrigin; 

app.activeDocument.viewPreferences.verticalMeasurementUnits = old_VOrigin; 

app.findTextPreferences = null; 

 

function setFrame (mAnchored){ 

  with (mAnchored) { 

  anchoredObjectSettings.anchoredPosition = AnchorPosition.ANCHORED; 

  anchoredObjectSettings.anchorPoint = AnchorPoint.BOTTOM_RIGHT_ANCHOR; 

  anchoredObjectSettings.horizontalReferencePoint = AnchoredRelativeTo.TEXT_FRAME; 

  anchoredObjectSettings.verticalReferencePoint = VerticallyRelativeTo.LINE_BASELINE; 

 

  textFramePreferences.insetSpacing = [0,0,0,1]; 

  textFramePreferences.verticalJustification = VerticalJustification.BOTTOM_ALIGN; 

  } 

  }

Jump_Over
Legend
May 23, 2014

@ hasvi

Are you sure it is your code?

Are you sure it is something new for OP, since it is copied from here:

     Anchor required

By the way, threads like this are getting far away from helping. Only goal is "do something instead of me, plssss"

Jarek