• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to know X, Y here(Transfom Panel) of selected items by ExtendScript?

Explorer ,
Apr 12, 2022 Apr 12, 2022

Copy link to clipboard

Copied

James23069990fqkl_0-1649767725441.png

 

TOPICS
Scripting , SDK

Views

177

Translate

Translate

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 guidelines
Adobe
Community Expert ,
Apr 12, 2022 Apr 12, 2022

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

Votes

Translate

Translate

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 guidelines
Explorer ,
Apr 14, 2022 Apr 14, 2022

Copy link to clipboard

Copied

When I select the whole layer 

layerSM.hasSelectedArtwork = true;
If there are clipping mask in the layer, then I can't get correct position using your method..
 

Votes

Translate

Translate

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 guidelines
Community Expert ,
Apr 12, 2022 Apr 12, 2022

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.

Votes

Translate

Translate

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 guidelines
Community Expert ,
Apr 14, 2022 Apr 14, 2022

Copy link to clipboard

Copied

LATEST

 

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:

How to know X, Y here(Transfom Panel) of selected items by ExtendScript?

pixxxelschubser_0-1649931707402.png

 

James23069990fqkl_0-1649767725441.png

 


By @LoveYou阿逗逼6666

 

 

For e better answer explain a bit more in detail what you have and what you want. Screenshots and/or example files are helpful.

 

Votes

Translate

Translate

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 guidelines