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.
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 =
Copy link to clipboard
Copied
What program: PS, IA...?
Copy link to clipboard
Copied
PS
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();
}
Copy link to clipboard
Copied
is there any possibility to run the script automatically via Scripts Events manager
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.
Copy link to clipboard
Copied
Thank u so much for the script this works fine
Copy link to clipboard
Copied
Glad it works for you.
Copy link to clipboard
Copied
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