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

Hi, Is there any possibility to save the paths using .jsx script

Explorer ,
Jul 16, 2016 Jul 16, 2016

Copy link to clipboard

Copied

Please tell some solution for workflow automation because every time i have draw the path and i need to double click on work path and its prompts for a name to save it. It makes me bored so i need help for making this workflow as auomated.

Views

1.1K

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 , Aug 22, 2016 Aug 22, 2016

Try this script. You can save it as a script then run it in an action and assign a hot key such as F3. The scripts assumes that the path you want to rename is named "Work Path". It also assumes that the naming sequence is PS default's: "Path 1, Path 2...."

#target photoshop

var doc = activeDocument;

var works = true

try{

    var curPath = doc.pathItems.getByName ('Work Path');

    }

catch(e){

    works = false;

    alert('There is no path named "Work Path"');

    }

if(works){

    try{

        var lastPath =

...

Votes

Translate

Translate
Community Expert ,
Jul 17, 2016 Jul 17, 2016

Copy link to clipboard

Copied

What program: PS, IA...?

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 ,
Aug 22, 2016 Aug 22, 2016

Copy link to clipboard

Copied

PS

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 ,
Aug 22, 2016 Aug 22, 2016

Copy link to clipboard

Copied

Try this script. You can save it as a script then run it in an action and assign a hot key such as F3. The scripts assumes that the path you want to rename is named "Work Path". It also assumes that the naming sequence is PS default's: "Path 1, Path 2...."

#target photoshop

var doc = activeDocument;

var works = true

try{

    var curPath = doc.pathItems.getByName ('Work Path');

    }

catch(e){

    works = false;

    alert('There is no path named "Work Path"');

    }

if(works){

    try{

        var lastPath = doc.pathItems[doc.pathItems.length-2];

        var pNum = lastPath.name.split(' ')[1];

        curPath.name = 'Path ' + (Number(pNum) + 1);

    }

    catch(e){curPath.name = 'Path 1'};

    curPath.deselect();

    }

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 ,
Aug 22, 2016 Aug 22, 2016

Copy link to clipboard

Copied

is there any possibility to run the script automatically via Scripts Events manager

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 ,
Aug 22, 2016 Aug 22, 2016

Copy link to clipboard

Copied

I don't think so, but I'm not sure. One of the issues would be determining when you were done creating the path. By putting the script in an action and assigning it to a function key, you just have to hit one key to indicate that you're done with the path and want to name it.

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 ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

Thank u so much for the script this works fine

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 ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

Glad it works for 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
Explorer ,
Sep 15, 2016 Sep 15, 2016

Copy link to clipboard

Copied

LATEST

the above script saves the work path into path 1 and so on.

but when i tried to trigger the script with Events script manager plugin in photoshop

and added an event for Selection like when i completed a path  and make selection of the work path

the path need to saved automatically using the script which added.

But i dont why the Script event manager doesn't trigger the external script.

(Event id i tried is 'slct')

Please anyone help me on this

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