欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

AI腳本分割文本框教程 腳本的作用

  發(fā)布時間:2015-04-21 14:39:03   作者:胡說八道   我要評論
下面為大家?guī)鞟I腳本分割文本框教程,希望大家看完之后會有一定的幫助

這篇教程教腳本之家的朋友們用AI腳本分割文本框,看圖就明白這個腳本的作用了:

OK來看這個效果是怎么弄的。該腳本可以將點(diǎn)文字、區(qū)域文字(段落文字)中做過分段的文本分為單獨(dú)的段落。

要用“文件-腳本”來使用,以CS3為例應(yīng)放在"C:\Program Files\Adobe\Adobe Illustrator CS3\預(yù)設(shè)\腳本"下。
當(dāng)然,也可以放置在其他文件夾中,通過Ctrl+F12定位到腳本所在處來使用。
使用時首先應(yīng)選中相應(yīng)文本,然后再選擇該腳本即可分為單獨(dú)的段落。

經(jīng)測試,該腳本在CS3、CS4上依然能夠使用。尊重作者,請勿刪除版權(quán)信息!
復(fù)制以下全部文字到記事本中,保存為以.js結(jié)尾的腳本文件(如:腳本.js)即可。


復(fù)制代碼
代碼如下:
/////////////////////////////////////////////////////////////////
//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;

以上就是AI腳本分割文本框教程,謝謝大家喜歡!

相關(guān)文章

最新評論