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

HOW GET THE CURRENT SELECTION PATHITEMS NAME USE SCRIPT?

New Here ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

HOW CAN I GET THE current selection Pathitems name use script??thank: )! ! ! ! !

QQ图片20170518113143.png

TOPICS
Actions and scripting

Views

559

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

Engaged , May 17, 2017 May 17, 2017

Hi pjwaixingren,

Thanks to c.pfaffenbichler and Hope this will help you.

alert(selectedPath().name);

function selectedPath () { 

    try { 

        var ref = new ActionReference(); 

        ref.putEnumerated( charIDToTypeID("Path"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 

        var desc = executeActionGet(ref); 

        var theName = desc.getString(charIDToTypeID("PthN")); 

        return app.activeDocument.pathItems.getByName(theName) 

    } 

    catch (e){ return undefined ;}

}; 

- y

...

Votes

Translate

Translate
Adobe
Engaged ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

Hi pjwaixingren,

Thanks to c.pfaffenbichler and Hope this will help you.

alert(selectedPath().name);

function selectedPath () { 

    try { 

        var ref = new ActionReference(); 

        ref.putEnumerated( charIDToTypeID("Path"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 

        var desc = executeActionGet(ref); 

        var theName = desc.getString(charIDToTypeID("PthN")); 

        return app.activeDocument.pathItems.getByName(theName) 

    } 

    catch (e){ return undefined ;}

}; 

- yajiv

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
New Here ,
May 17, 2017 May 17, 2017

Copy link to clipboard

Copied

LATEST

thank you:)!!

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