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

Set Kerning/Tracking Increment with a Script

Engaged ,
Feb 09, 2023 Feb 09, 2023

Trying to set the Edit > Preferences > Units & Increments > Kerning /Tracking value with a script.

 

Is that not part of the object model?

 

Thanks,

Ken

TOPICS
Scripting
791
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 , Feb 09, 2023 Feb 09, 2023

Hi @KenWK , They are set in the textPreferences object. For the application it would be

 

app.textPreferences.kerningKeyIncrement = n

 

 

and for the doc it would be

 

 

app.activeDocument.textPreferences.kerningKeyIncrement = n;

 

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

 

Translate
Community Expert ,
Feb 09, 2023 Feb 09, 2023

Hi @KenWK , They are set in the textPreferences object. For the application it would be

 

app.textPreferences.kerningKeyIncrement = n

 

 

and for the doc it would be

 

 

app.activeDocument.textPreferences.kerningKeyIncrement = n;

 

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

 

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
Engaged ,
Feb 09, 2023 Feb 09, 2023

Oy-vey. Thanks Rob. No bleeping idea how I missed that in the VBA object model.

 

Thanks too for the great we page.

 

Best ,

Ken

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 ,
Feb 09, 2023 Feb 09, 2023

What about setting your tracking within your Paragraph Styles?

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
Engaged ,
Feb 09, 2023 Feb 09, 2023
LATEST

Thanks for responding Derek. We're working with 1,500 or so files created by someone else and will likely need to kern some things to fit as they did before and anything I can set with a script will be helpful.

 

Best,

Ken

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