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

how to have the actions to record the selection of an object

Explorer ,
Jun 20, 2022 Jun 20, 2022

hi,

i tried to pick the object on the rhs and have the action to record my selection as shown in the attached screenshot.Screen Shot 2022-06-20 at 14.45.35.png

i do not know how to have the action record this ... all the item names are <path>...

any help or comment...

thanks and cheers,

TOPICS
Scripting
3.2K
Translate
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

correct answers 1 Correct answer

Guide , Jun 22, 2022 Jun 22, 2022

See if this works for you.  If it does, you can include it in your action.

app.selection = null;
var items1 = app.activeDocument.pathItems;
var items2 = [];
for (var i = 0; i < items1.length; i++) {
    if (items1[i].pathPoints.length == 4 && 
        items1[i].closed == true && 
        items1[i].stroked == true) {
            items2.push(items1[i]);
    }
}
for (var i = 0; i < items2.length; i++) {
    items2.sort(function(a, b) {
        return b.visibleBounds[2] - a.visibleBounds[2];})
}
for 
...
Translate
Adobe
Explorer ,
Jun 22, 2022 Jun 22, 2022
LATEST

femkeblanco,

i have tried the script, it works well ...

thanks for your help...

cheers,

Translate
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