Copy link to clipboard
Copied
Copy link to clipboard
Copied
alert (app.activeDocument.selection[0].position)
will give you the top left position of the selected item - but always in points and with negativ Y-value
Copy link to clipboard
Copied
When I select the whole layer
layerSM.hasSelectedArtwork = true;
Copy link to clipboard
Copied
For multiple objects that are not grouped, the script cannot simply ask for the answer.
The “position” property always returns the coordinates of the path. It does not take the stroke width into account.
Conversely, the “top” and “left” properties always return the coordinates outside the stroke width.
Copy link to clipboard
Copied
Sorry, but this was not your question. My snippet is one possibility that gives you X, Y (Transfom Panel) of selected item by ExtendScript. That was your question:
![]()
By @James23069990fqkl
For e better answer explain a bit more in detail what you have and what you want. Screenshots and/or example files are helpful.