Hello All
In my Illustrator (CS1 WINDOWS2000sp4. JRE 5 update)script isn't working corect.
Java script is working, becouse test script like this is OK.
- ------------------------------
var test = "hello";
print(test);
- -----------------------------
working with object is't imposible, With object is nothing happens.
- --------------------------------------------------------------------------------------------
//$.bp()
mySelection = activeDocument.selection;
if (mySelection.length>0){
if (mySelection instanceof Array){
goal=mySelection[mySelection.length-1];
centerPoint=goal.position[0]+(goal.width/2);
for (i=0; i<(mySelection.length-1); i++){
obj=mySelection[i];
if(obj.typename=='TextArtItem'){
outl=obj.duplicate();
outline=outl.createOutline();
dist=(outline.position[0]+outline.width/2)-centerPoint;
outline.remove();
obj.position=Array((obj.position[0]-dist),(obj.position[1]))
}else{
obj.position=Array((centerPoint-(obj.width/2)),(obj.position[1]));
}
}
}
}else{}
- --------------------------------------------------------------------------------------------------