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

Changing Fill/Stroke tint on Text/Objects

New Here ,
Aug 26, 2010 Aug 26, 2010

Maybe it´s possible to create scripts as for example:

1 - Script increase 10% tint Black fill for Frame Text (to apply in text) selected by Selection Tool (I hate Type tool)

2 - Script increase 10% tint Black stroke for Frame Text (to apply in text) selected by Selection Tool (I hate Type tool)

3 - Script increase 10% tint fill Black for Object

4 - Script increase 10% tint Black stroke for Object

Application:

The Script (Alt+>) on selected object with 10% Tint Black go to 20% Black, So apply the same script (Alt+>) and the object go to 30% Tint Black, on the on till 100% Black.

Other Script (Alt+<) to decrease till 0% Black (no fill)

4 Scripts (1,2,3,4) to increase and 4 Scripts (1,2,3,4) to decrease.

I hope you understand me. Thank you very much!

TOPICS
Scripting
548
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 ,
Aug 26, 2010 Aug 26, 2010

Four scripts? Sure. (Disclaimer: all typed directly into the forum, it May Not Work.)*

1.

if (app.selection[0].hasOwnProperty("texts"))

app.selection[0].texts[0].fillTint = app.selection[0].texts[0].fillTint < 90 && app.selection[0].texts[0].fillTint != -1 ? app.selection[0].texts[0].fillTint + 10 : 100;

2.

if (app.selection[0].hasOwnProperty("texts"))

app.selection[0].texts[0].strokeTint = app.selection[0].texts[0]. strokeTint < 90 && app.selection[0].texts[0]. strokeTint != -1 ? app.selection[0].texts[0]. strokeTint + 10 : 100;

3.

if (app.selection[0].hasOwnProperty("fillTint"))

app.selection[0].fillTint = app.selection[0].fillTint < 90 && app.selection[0].fillTint != -1 ? app.selection[0].fillTint + 10 : 100;

4.

if (app.selection[0].hasOwnProperty("strokeTint"))

app.selection[0].strokeTint = app.selection[0].strokeTint < 90 && app.selection[0].strokeTint != -1 ? app.selection[0].strokeTint + 10 : 100;

The reverse, 10% lighter, would be this

1.

if (app.selection[0].hasOwnProperty("texts"))

app.selection[0].texts[0].fillTint = app.selection[0].texts[0].fillTint < 0 ? 100 : app.selection[0].texts[0].fillTint > 10 ? app.selection[0].texts[0].fillTint - 10 : 0;

2.

if (app.selection[0].hasOwnProperty("texts"))

app.selection[0].texts[0]. strokeTint = app.selection[0].texts[0].fillTint < 0 ? 100 : app.selection[0].texts[0]. strokeTint > 10 ? app.selection[0].texts[0]. strokeTint - 10 : 0;

3.

if (app.selection[0].hasOwnProperty("fillTint"))

app.selection[0].fillTint = app.selection[0].fillTint < 0 ? 100 : app.selection[0].fillTint > 10 ? app.selection[0].fillTint - 10 : 0;

4.

if (app.selection[0].hasOwnProperty("strokeTint"))

app.selection[0].strokeTint = app.selection[0]. strokeTint < 0 ? 100 : app.selection[0].strokeTint > 10 ? app.selection[0].strokeTint - 10 : 0;

* Not entirely true anymore -- I just had to try, and fortunately found a bugfeature (or possibly a featurebug): when the Fill or Stroke reaches 100%, it is reported as "-1".

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
New Here ,
Aug 26, 2010 Aug 26, 2010
LATEST

It's working. Thank you very much!!!!!

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