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

adding script label to active text box

Community Beginner ,
Jan 16, 2018 Jan 16, 2018

Hello all,

Please help to add 'script label' active text box in a complete indesign document..

Thanks,

Anil

TOPICS
Scripting
2.9K
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

correct answers 1 Correct answer

Contributor , Jan 16, 2018 Jan 16, 2018

scriptLable.png

scipt.png

Translate
Contributor ,
Jan 16, 2018 Jan 16, 2018

scriptLable.png

scipt.png

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
Contributor ,
Jan 16, 2018 Jan 16, 2018

hey Anil,

           If you want to give it through script, you can try this......

activeTextBox.label = "myLabel";

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
Community Beginner ,
Jan 16, 2018 Jan 16, 2018

Thanks for help. Does this work in complete indesign document?

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
Contributor ,
Jan 16, 2018 Jan 16, 2018

Be clear If you are asking for code or screenshot?

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
Community Beginner ,
Jan 16, 2018 Jan 16, 2018

Sorry for confusion..I'm asking for code...

Thanks,

Anil

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
Contributor ,
Jan 17, 2018 Jan 17, 2018

try this..

var myDoc = app.documents[0];

var page = myDoc.pages;

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

    page.textFrames[0].label = "myLable" + i;

    }

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
Community Beginner ,
Jan 17, 2018 Jan 17, 2018
LATEST

thanks a ton...it works fine....

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
Community Expert ,
Jan 17, 2018 Jan 17, 2018

What do you mean by complete document?

Look into DOM documentation for property label or methods insertLabel() and extractLabel().
You'll find, that label is a property of a lot of objects.

Even available for a Document object or the app itself.

Be aware that the user interface cannot reveal all your label entries you can do by scripting.

DOM documentation compiled by Gregor Fellenz:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#about.html

DOM documentation compiled by Jongware:

Adobe InDesign CS6 (8.0) Object Model JS: TextFrame

More of this:

Indesign JavaScript Help

Regards,
Uwe

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
Community Beginner ,
Jan 17, 2018 Jan 17, 2018

thanks all for help....

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