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

Re: How to select characterStyles panel "[none]"

Community Beginner ,
May 18, 2018 May 18, 2018

Thanks you reply!

I need done, javascript code. Please share any code

var noneProperties = app.activeDocument.characterStyles.itemByName("[None]").properties;

not working;

Thanks

KS

Discussion branched and moved from InDesign to InDesign Scripting

TOPICS
Scripting
415
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 ,
May 18, 2018 May 18, 2018

Which version of InDesign do you have and which version of your operating system?

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 ,
May 18, 2018 May 18, 2018

InDesing CS6 (ver 8.0) windows 10

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 ,
May 18, 2018 May 18, 2018
LATEST

sk88746243  wrote

Thanks you reply!

I need done, javascript code. Please share any code

var noneProperties = app.activeDocument.characterStyles.itemByName("[None]").properties;

not working;

Thanks

KS

Hi KS,

you posted in the "ordinary" InDesign Forum and did not tell you need a script in your inital post.

The answer is very simple code-wise. Simply assign the first character style in the list of styles to a variable name.

var charStyleNone = app.activeDocument.characterStyles[0];

Question is, if that one has property/value pairs at all?

Check the result of the snippet below in the ESTK:

var charStyleNone = app.activeDocument.characterStyles[0];

var c = 0;

var e;

for( x in charStyleNone )

{

    try{

    $.writeln( c+"\t"+x +"\t"+ charStyleNone.toString() );

    }catch(e)

    {

        for( y in e )

        {

            $.writeln(c+"\t"+"ERROR"+"\t"+y+"\t"+e.toString() );

        }

    };

    c++

};

FWIW: This thread should be moved over to: InDesign Scripting

Best,
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