#target illustrator // v.0.1 // Транслітератор тексту від Агентів змін — http://translit.a3.kyiv.ua. Автор — Олександр Колодько. // Інструмент для транслітерації топонімів. У основі географічна транслітерація УКППТ 1996, у якій прибрані апострофи, усунено дублювання у «iie» та «iia», «ьо» транслітерується як «io». // Побажання та відгуки надсилайте на info@a3.kyiv.ua // https://github.com/agentyzmin/a3-tools/tree/master/a3_translit // if a document is open if(documents.length >0) { // if textframes exist in the document if(activeDocument.textFrames.length > 0) { // check to make sure something is selected. selectedItems = selection if (selectedItems.length > 0) { // If the user has selected characters inside a text frame then // typename is TextRange. Display it contents and return. if (selectedItems.typename == "TextRange") { var sourceText = selectedItems.contents; var translitText = translit(sourceText); selectedItems.contents = translitText; } else { // If we get here, there are selected text frames. Display the contents of each. var itemFound = false; for(var i=0; i