JavaScript Script: Trigger Action through ENTER key of Path Deselection
[Using PS 2019 on Windows 10]
What I am trying to achieve is to rasterize the current path when it is confirmed.
if(app.currentTool == "penTool") {
//when path is "confirmed", through hitting ENTER or pressing ctrl+LMB
app.activeDocument.activeLayer.rasterize(RasterizeType.ENTIRELAYER);
}This could also be achieved by checking:
if(/*amount of pathPoints>0 && no pathPoint selected*/) {
app.activeDocument.activeLayer.rasterize(RasterizeType.ENTIRELAYER);
}Unfortunately, I haven't been successful with either method. Any pointers? I am very new to PS scripting.
Hope this makes sense!
