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

inDesign CS6 - changing button description ( tooltip ) using JavaScript

New Here ,
Apr 24, 2018 Apr 24, 2018

Copy link to clipboard

Copied

Hi,

I have a series of inDesign files with several interactive buttons. I need to manipulate both the NAME of the buttons, and also the DESCRIPTION of the button.

The DESCRIPTION is the PDF OPTION of the BUTTON AND FORMS pop up window from the INTERACTIVE MENU. I believe the DESCRIPTION is equivalent to  'TOOLTIP' in Acrobat.

So far, I have access to the NAME of the buttons by using the following in JavaScript in inDesign.

for (i = 0 ; i< QtyButtons;i++){

$.writeln("i= ",i,"   ",myDoc.buttons.name);

}

I could not find the proper code to access ( read ) the button DESCRIPTION.

( buttons.description -  buttons.tooltip - ... else ... )

Any help I could get will be greatly appreciated.


Thanks

Gervais

TOPICS
Scripting

Views

1.4K

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
Community Expert ,
Apr 25, 2018 Apr 25, 2018

Copy link to clipboard

Copied

Hi Gervais,

I remember, that there were some bugs around button description in CS6 that were only fixed in a later version of CC.

Definitely there is a property description for the button object that takes a string.

See here in Jongware's DOM description that is also available online:

Adobe InDesign CS6 (8.0) Object Model JS: Button

Regards,
Uwe

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
Community Expert ,
Apr 25, 2018 Apr 25, 2018

Copy link to clipboard

Copied

Found the relevant discussion about the bug:

Re: [ESTK] somehow is puzzling: Throwing strange errors on some properties

See here for the versions the issues were fixed:

Re: [ESTK] somehow is puzzling: Throwing strange errors on some properties

As to my knowledge and testing, these issues should be fixed in:

InDesign CC v9.3.0

InDesign CC-2014.2 v10.2.0

CC Simple Save Back Service (the IDML related problems)

The problems are not fixed in CS6 v8.1.0.

Regards,
Uwe

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
New Here ,
Apr 25, 2018 Apr 25, 2018

Copy link to clipboard

Copied

Thanks much for this very quick response.

I will have to updgrade to newer inDesign

Rgds

Gervais

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
Contributor ,
Apr 26, 2018 Apr 26, 2018

Copy link to clipboard

Copied

LATEST

Hello, I have a simple code that will update names and description of all buttons in InDesign document. I am not sure of CS6, but this script works fine in Indesign CC 2018. Here is the script

function updateButtons()
{
     var myDoc = app.activeDocument;
     var buttons = myDoc.buttons;
     for (var i = 0; i < buttons.length; i++)
     {
          var btn = buttons;
          btn.name = "New Name " + i;
          btn.description = "New Description " + i;
     }
}


updateButtons()

You can change name and description as per your requirement. Hope this will help you.

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