blog/
Урок — Случайный стиль к выбранному тексту в InDesign
Ролик о применении случайного стиля к выбранному тексту! Основан на уроке Кира Витковского о дикой типографике в inDesign.
Скрипт качать вот тут: https://github.com/dmtrvk/applyRandomCharacterStyle.
Это урок из нашего курса вёрстки в InDesign.
Подробнее — на странице курса.
// Script by Ivan Tolstikov @dmtrvk.ru
// Thanks to http://kasyan.ho.ua/tips/indesign_script/code_samples/how_to_reference_style_inside_groups/how_to_reference_style_inside_groups.html for saving my time
var doc = app.activeDocument;
var styleGroup = doc.characterStyleGroups.item("Random Characters"); // Change the character group here as you wish
if (!styleGroup.isValid) ErrorExit("Character style group\"Random Characters\" doesn't exist.", true);
if (! app.selection[0]){
exit();
}
if (app.selection[0].characters.length < 1){
for (i=0; i<app.selection[0].paragraphs[0].characters.length; i++){
doc.selection[0].paragraphs[0].characters[i].appliedCharacterStyle = styleGroup.characterStyles.anyItem();
}
}
else {
for (i=0; i<app.selection[0].characters.length; i++){
doc.selection[0].characters[i].appliedCharacterStyle = styleGroup.characterStyles.anyItem();
}
}
Similar Posts:
- Урок — Буквы от больших к маленьким в InDesign
- Script for choosing a winner on Instagram (JavaScript Instagram comment picker)
- Script for choosing a winner on Instagram (JavaScript Instagram comment picker)
- Calculate inclination of a roof valley with Python
- Как разыграть бесплатные места на курсе вёрстки для архитекторов (JS+Instagram)
▥