The question 1 is solved, is fontStyle instead fontStyleName, my mistake..
1 person found this helpful
Your table has a frame's (paragraph TTYTT) width while created by default. Store this value before setting custom width and calculate column width using this as a base.
to find current doc color name collect all collor name in an array and use a trick to match.Something like:
var mDoc, mNames = mDoc.swatches.everyItem().name, mString = "@@" + mNames.join("@@") + "@@", // so we've got a string "@@name1@@name2@@....@@" foundName = mString.match(/[^@]+?2018(?=@@)/), foundColor = foundName ? mDoc.swatches.item(foundName) : false; if (!foundColor) alert ("Color '....2018' not found in a doc: " + mDoc.name);
So var foundColor is false or a color object ready to apply
Thank you so much Jarek!
if it is possible to explain to me line 06
appreciating your response
This is a shorter way to conditional assigning a value.
variable = condition ? valueIfTrue : valueIfFalse;
foundName could be an Array with string matched (true) or null (false).
it adds valuable knowledge to me.
may you suggested for me further reading about conditional assigning a value.