• Global community
• Language:
• Deutsch
• English
• EspaĆ±ol
• FranĆ§ais
• PortuguĆŖs
• ę„ę¬čŖć³ćć„ććć£
Dedicated community for Japanese speakers
• ķźµ­ ģ»¤ė®¤ėķ°
Dedicated community for Korean speakers
Exit Search
• Differentiating PathText shape

# Differentiating PathText shape

Community Beginner ,
Jun 12, 2022 Jun 12, 2022

Copied

How can we differentiate the PathText as an ellipse or a rectangle by using a script?

TOPICS
Scripting

Views

116

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Guide , Jun 12, 2022 Jun 12, 2022
``````// select areaText or pathText textFrame
var Ps = app.selection[0].textPath.pathPoints;
var polygon = true;
for (var i = 0; i < Ps.length; i++) {
var test = Ps[i].anchor[0] == Ps[i].rightDirection[0] &&
Ps[i].rightDirection[0] == Ps[i].leftDirection[0] &&
Ps[i].anchor[1] == Ps[i].rightDirection[1] &&
Ps[i].rightDirection[1] == Ps[i].leftDirection[1];
if (!test) {
polygon = test;
break;
}
}
``````
...

2 Replies 2
Guide ,
Jun 12, 2022 Jun 12, 2022

Copied

``````// select areaText or pathText textFrame
var Ps = app.selection[0].textPath.pathPoints;
var polygon = true;
for (var i = 0; i < Ps.length; i++) {
var test = Ps[i].anchor[0] == Ps[i].rightDirection[0] &&
Ps[i].rightDirection[0] == Ps[i].leftDirection[0] &&
Ps[i].anchor[1] == Ps[i].rightDirection[1] &&
Ps[i].rightDirection[1] == Ps[i].leftDirection[1];
if (!test) {
polygon = test;
break;
}
}

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Expert ,
Jun 12, 2022 Jun 12, 2022

Copied

LATEST

Please show screenshot or post example document of the two situations you need to differrentiate.

- Mark