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

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

Community Beginner ,
May 18, 2018 May 18, 2018

Copy link to clipboard

Copied

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

Views

297

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

InDesing CS6 (ver 8.0) windows 10

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

Copy link to clipboard

Copied

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

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