这篇教程教脚本之家的朋友们用ai脚本分割文本框,看图就明白这个脚本的作用了:

OK来看这个效果是怎么弄的。该脚本可以将点文字、区域文字(段落文字)中做过分段的文本分为单独的段落。

要用“文件-脚本”来使用,以CS3为例应放在”C:\Program Files\Adobe\Adobe Illustrator CS3\预设\脚本”下。
当然,也可以放置在其他文件夹中,通过Ctrl+F12定位到脚本所在处来使用。
使用时首先应选中相应文本,然后再选择该脚本即可分为单独的段落。

经测试,该脚本在CS3、CS4上依然能够使用。尊重作者,请勿删除版权信息!
复制以下全部文字到记事本中,保存为以.js结尾的脚本文件(如:脚本.js)即可。

复制代码 代码如下: /////////////////////////////////////////////////////////////////

//Divide TextFrame v.2 — CS,CS2

//>=————————————–

// Divides a multiline text field into separate textFrame objects.

// Basically, each line in the selected text object

// becomes it’s own textFrame. Vertical Spacing of each new line is based on leading.

//

// This is the opposite of my “Join TextFrames” scripts which

// takes multiple lines and stitchs them back together into the same object.

//>=————————————–

// JS code (c) copyright: John Wundes ( [email protected] ) www.wundes.com

//copyright full text here: http://www.wundes.com/js4ai/copyright.txt

//////////////////////////////////////////////////////////////////

if(activeDocument.selection[0].contents.indexOf(“\n”) != -1){

//alert(“This IS already a single line object!”);

}else{

//get object position

//make array

var lineArr = fieldToArray(activeDocument.selection[0]);

//alert(lineArr);

tfTop = activeDocument.selection[0].top;

tfLeft = activeDocument.selection[0].left;

以上就是AI脚本分割文本框教程,谢谢大家喜欢!

声明:本站(华域联盟www.cnhackhy.com)所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。