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

Setting word- and letter spacing as default.

Community Beginner ,
May 29, 2015 May 29, 2015

Hello all you clever guys

Im trying to make a script which sets some specific values for my letter and word spacing and glyph scaling.

But i dont want to apply it to a paragraph style. Im trying to set it default/general rule for paragraph styles, which haven't been created yet.

I found soooo many different post and threads, but only how to apply it to an existing style.

Can you guys help me?

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

Enthusiast , May 31, 2015 May 31, 2015

You need text defaults for that. Realize, that your standard paragraph (don’t use basic paragraph in any case) has a plus-symbol after his name and that your settings can easily be overwritten. So I would think, that this is not the best workaround for setting defaults!

app.documents[0].textDefaults.minimumWordSpacing = 70;

–Kai

Translate
Contributor ,
May 29, 2015 May 29, 2015

You can set this per document or at the App level.

Set Basic Paragraph to have those values.  Set a shortcut key to Basic Paragraph.  When you open any new doc, it begins with those values.

It's (virtually) the same as having a script that toggles it on, except writing a script would take you more time.  The ONLY advantage in having it in script form is when you are in any Style you can toggle that on and create an override.

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 29, 2015 May 29, 2015

This is only a part of a bigger script, everything else is working fine.

How would the code look then? i feel like i tried everything like


app.activeDocument.minimumWordSpacing = 70;

app.minimumWordSpacing = 70;

and i can't use app.activeDocument.paragraphStyle.minimumWordSpacing = 70;

it seems i can't find a way to target it :s

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
Enthusiast ,
May 31, 2015 May 31, 2015

You need text defaults for that. Realize, that your standard paragraph (don’t use basic paragraph in any case) has a plus-symbol after his name and that your settings can easily be overwritten. So I would think, that this is not the best workaround for setting defaults!

app.documents[0].textDefaults.minimumWordSpacing = 70;

–Kai

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 31, 2015 May 31, 2015

I understand that this can be overwritten and agree that this is a "bad" workaround.

Nevertheless i still want to see it through.

  1. app.textDefaults.minimumWordSpacing = 70;

changed your code to this and now i works. Thanks dude

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
Contributor ,
May 31, 2015 May 31, 2015

Fantastic.  App-level default.

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
Enthusiast ,
May 31, 2015 May 31, 2015
LATEST

Jeppe, this will surely work on document level too.

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