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

convert live captions to static on all pages?

Community Beginner ,
Jun 03, 2013 Jun 03, 2013

Hi All,

I have a 20 page document with some 30 linked graphics on each page, each with a live caption. when i'm ready to publish, i'd like to convert all the live captions to static (so as to be able to do some subtle editing on selected items).

can someone help me with a script to convert the live captions to static on ALL pages as opposed to one page at a time?

Thanks so much!!

Stef

TOPICS
Scripting
1.4K
Translate
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
Mentor ,
Jun 03, 2013 Jun 03, 2013

Hi,

before run input your variable name (displayed in Text:Text Variables menu)

var myDoc = app.activeDocument;

var myCap = myDoc.textVariables.item("yourVarName");     // <== edit here

var l = myCap.associatedInstances.length;

while (l--)

     myCap.associatedInstances[0].convertToText();

However much easier is to mouse-klick in UI:

     select anyone of your caption instances ==>

     go to Text:Text Variables:Define window ==>

     choose your variable ==>

     klick "convert to text" button.

Jarek

Translate
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
Explorer ,
Jun 03, 2013 Jun 03, 2013

Did you mean the 0 in the last line to actually be an l? As in, it should be:

myCap.associatedInstances.convertToText();

Translate
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
Mentor ,
Jun 04, 2013 Jun 04, 2013

Hi @ dln385

What is wrong with converting item [0] - always first - in while loop?

Changing this to [1] leads to an error at the end ("object undefined")...

and the last one stay unconverted.

Jarek

Translate
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
Explorer ,
Jun 04, 2013 Jun 04, 2013
LATEST

Sorry, I misunderstood what the code was doing and thought that was a typo.

Translate
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