Scripting the Pen tool

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

genekogan

Scripting the Pen tool

Post by genekogan »

Hello all,

Is it possible to script the pen tool? I don't see it exposed in the javascript API and Script Listener plugin does not seem to record it. I would like to be able to program pen shapes by feeding it a series of (x,y) points. Would appreciate any help on this! thanks!

gene

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

genekogan

Scripting the Pen tool

Post by genekogan »

Note I am using CS5.
larsen67

Scripting the Pen tool

Post by larsen67 »

Would you not pass your array of x,y data to a new path item?
genekogan

Scripting the Pen tool

Post by genekogan »

Not sure I know what you mean. What I'd like to do is use the pen to make shapes with arbitrary vertexes and contours. Anyway I can do that would be fine by me, I just don't see how to use the tool at all through scripting.
Mike Hale

Scripting the Pen tool

Post by Mike Hale »

You can not script the pen tool. You can use SubPathInfo to define a path then use that to create a path using pathItems.add(). The scripting guide has details and a sample script.