- Сообщения
 - 2 089
 
- Реакции
 - 145
 
Здравствуйте господа...! Я пытаюсь вникнуть, но пока не получается.. 
Подскажите плиз как соеденить эти два скрипта...
	
	
	
		
те я хочу в первыую часть добавить еше и стили, чтоб еще и стили применялись к заданным словам ....Thanks!
				
			
Подскажите плиз как соеденить эти два скрипта...
		Код: 
	
	if (app.documents.length > 0 && app.activeDocument.textFrames.length > 0) {
  // Create the color to apply to the words
  var wordColor = new RGBColor();
  wordColor.red = 0;
  wordColor.green = 100;
  wordColor.blue = 255;
  // Set the value of the word to look for searchWord1 = "the";
  var searchWord1 = "Coffee";
  var searchWord2 = "All";
  var searchWord3 = "Because";
  // Iterate through all words in the document
  // and color the words that match searchWord
  for (var i = 0; i < app.activeDocument.textFrames.length; i++) {
    var textArt = activeDocument.textFrames[i];
    for (var j = 0; j < textArt.words.length; j++) {
      var word = textArt.words[j];
      if (word.contents == searchWord1 || word.contents == searchWord2 || word.contents == searchWord3) {
        word.filled = true;
        word.fillColor = wordColor;
        word.size = 108;
       
       word.contents=word.contents.toUpperCase();
     // word.contents=word.contents.toLowerCase();
     
       
      }
    }
  }
}
//===================================Apply graphicStyles ================================
var myStyles=[4,5,6];
var doc = app.activeDocument;
//var artLayer = doc.layers[0];
for (i = 0; i < doc.textFrames.length; i++) {
  var styleIndex = Math.round(Math.random() * (myStyles.length - 1));
  doc.graphicStyles[myStyles[styleIndex]].applyTo(doc.textFrames[i]);
}
	те я хочу в первыую часть добавить еше и стили, чтоб еще и стили применялись к заданным словам ....Thanks!
Вложения
			
				Последнее редактирование: