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

Select first (top) path with a shortcut or a script

Explorer ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

Is it possible to select the first (top) path, regardless of its name, with a shortcut or a script?

Note: Not making a selection of the path but select the path it self in the path menu. (So that I can rename it with a shortcut.)

I like to know how.

Views

295

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

correct answers 1 Correct answer

Community Expert , Jun 01, 2017 Jun 01, 2017

Selecting the topmost Path in the Paths Panel is not the same as double-clicking its name field, though.

// 2017, use it at your own risk;

#target photoshop

if (app.documents.length > 0) { 

var myDocument = app.activeDocument;

if (myDocument.pathItems.length > 0) {

myDocument.pathItems[0].select()

}

};

Votes

Translate

Translate
Adobe
Community Expert ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

Selecting the topmost Path in the Paths Panel is not the same as double-clicking its name field, though.

// 2017, use it at your own risk;

#target photoshop

if (app.documents.length > 0) { 

var myDocument = app.activeDocument;

if (myDocument.pathItems.length > 0) {

myDocument.pathItems[0].select()

}

};

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 ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

Is it always to be the same name or do you intend to manually enter the new name?

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 ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

Always the same name: Path 1

(I rename it with an action.)


Thanks 4 your help!

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 ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

LATEST

Then try this:

// 2017, use it at your own risk;

#target photoshop

if (app.documents.length > 0) { 

var myDocument = app.activeDocument;

if (myDocument.pathItems.length > 0) {

myDocument.pathItems[0].name = "Path 1"

}

};

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