Skip to main content
Inspiring
October 9, 2010
Question

Fill Tint script problem

  • October 9, 2010
  • 1 reply
  • 579 views

A long time ago I downloaded this script in this forum:

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;

My problem is when I Select my object Fill 100% Tint Black, and try decrease the tint %, a error appear:

This topic has been closed for replies.

1 reply

Jongware
Community Expert
Community Expert
October 9, 2010

Yeah, that's one of mine.

Very annoying. I tested it after writing, and, really, truly, honestly, it did work. Now it doesn't anymore.

This'll work slightly better -- spot the differences ...

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

app.selection[0].fillTint = app.selection[0].fillTint < 0 ? 90 : (app.selection[0].fillTint > 10 ? app.selection[0].fillTint - 10 : 0);