当前位置:首页>资讯中心
学院新闻:
平面设计培训教程-教你用AI脚本分割文本框

 

今天非凡学院推出的平面设计教程是教朋友们用ai脚本分割文本框,看图就可以明白这个脚本的作用了:
平面设计培训
ok!(平面设计培训)我们来来看这个效果是怎么弄的。该脚本可以将点文字、区域文字(段落文字)中做过分段的文本分为单独的段落。
要用“文件-脚本”来使用,(平面设计培训)以cs3为例应放在"c:\program files\adobe\adobeillustrator 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 ( john@wundes.com ) 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;

欲知更多的illustrator请及时关注非凡学院平面设计培训教程
 

发布时间 : 2014/3/24 10:06:46 | 分类 :

焦点资讯
学员评价
  •  王晓露
    海尔集团  营销部长
    很喜欢这里的老师,教课很用心,很博学,幽默,这是我一生中经历过的最好的培训学院。感受颇多,让我认识了一个全新的网销世界,懂得如何去做网络营销!
  •  孙丽
    海尔集团 美工
    学院环境优美安静,老师讲课生动,很有亲和力,使人听后有求知欲,案例分解精辟,很实用!活动有趣,启发大;理论性与实践性相结合,实战上课,指导性强!
收缩