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

Indesign Scripting: Bullet List Unicode

Explorer ,
Oct 25, 2021 Oct 25, 2021

Hi there,

 

i am trying to get a certain unicode id of "003E". i cannot find out how to add this to a paragraph style i am creating. Also the color of the bullet. Any help will be appreciated!

 

 

var myDoc = app.activeDocument;
var text = "Poppins";
var bold = "Bold";
var regular = "Regular";
var bulletType = "003E";

bulletList = myDoc.paragraphStyles.add(
  {
    name : 'Main Bullets',
    appliedFont : text,
    fontStyle : regular,
    pointSize : 12,
    bulletsAndNumberingListType : ListType.BULLET_LIST,
    bulletsAndNumberingSize : 14,
    bulletsCharacterStyle : bold,
    bulletsandNumberingColor : "Red"
  }
 );

 bulletList.tabStops.add(
   {
     position : "0p18"
   }
 );

 

 

TOPICS
Scripting
770
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

Community Expert , Oct 25, 2021 Oct 25, 2021

Hi @kyleo94921011,

Try the following

var text = "Poppins";
var bold = "Bold";
var regular = "Regular";
var bulletType = "003E";

bulletList = myDoc.paragraphStyles.add(
  {
    name : 'Main Bullets',
    appliedFont : text,
    fontStyle : regular,
    pointSize : 12,
    bulletsAndNumberingListType : ListType.BULLET_LIST,
    bulletsAndNumberingSize : 14,
    bulletsCharacterStyle : bold,
    bulletsandNumberingColor : "Red"
  }
 );

bulletList.bulletChar.characterType = BulletCharacterType.UNI
...
Translate
Community Expert ,
Oct 25, 2021 Oct 25, 2021

[Moderator moved from Coding Corner to InDesign.]


Nancy O'Shea— Product User, Community Expert & Moderator
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 ,
Oct 25, 2021 Oct 25, 2021

Hi @kyleo94921011,

Try the following

var text = "Poppins";
var bold = "Bold";
var regular = "Regular";
var bulletType = "003E";

bulletList = myDoc.paragraphStyles.add(
  {
    name : 'Main Bullets',
    appliedFont : text,
    fontStyle : regular,
    pointSize : 12,
    bulletsAndNumberingListType : ListType.BULLET_LIST,
    bulletsAndNumberingSize : 14,
    bulletsCharacterStyle : bold,
    bulletsandNumberingColor : "Red"
  }
 );

bulletList.bulletChar.characterType = BulletCharacterType.UNICODE_ONLY
bulletList.bulletChar.characterValue = 0x003e
 bulletList.tabStops.add(
   {
     position : "0p18"
   }
 );

-Manan

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 ,
Oct 25, 2021 Oct 25, 2021

Hi.

I ran the code, and the addition of the burette worked fine.
The color is specified by setting the bulletCharacterStyle property.

So you need a predefined characterStyle to use for that.

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 ,
Oct 26, 2021 Oct 26, 2021
LATEST

awesome thank you guys for all the 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
Community Expert ,
Oct 25, 2021 Oct 25, 2021

The complete list of properties that can be accessed for bullet can be looked at the following link

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

-Manan

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