Question
How to select one of the vertex path points with a script?
Hello, I'm Rahadyan,
I'm making a script to find out if one of the vertex path points is selected or not.
The code is like this:
var shapeLayer = app. project. activeItem. layer("Shape Layer 1");
var pathProperty = shapeLayer.property("Contents").property("Rectangle 1").property("Contents").property("Path 1").property("Path");
var pathData = pathProperty.value;
var points = pathData. vertices;
var vertex = points[1];
if (vertex. selected) {
alert("Vertex is currently selected!");
} else {
alert("Vertex is not selected.");
}After I tried running it, even though I had selected the intended vertex it was still "Vertex is not selected.".
Is there something wrong with my code? Please help.
