Copy link to clipboard
Copied
Hi,
Trying to get familiar with javaScript coding for Photoshop. Reading the documents a lot.
However, quick question. Is there any good tutorial on how to create / draw a new simple rectangle to the document? In Illustrator I find it very easy, but only examples I find for Photoshop is to manually draw out a path with coordinates for each point. Maybe this is the way to go? Want to see if there's any easier way to go with a simple shape like a rectangle.
Thanks,
Mike
I've managed to figure it out using script listener. Great tool to extract actions in photoshop. It is a bit hard to read though.. but doable. Just need to spend some time cleaning it up. 🙂
Copy link to clipboard
Copied
I've managed to figure it out using script listener. Great tool to extract actions in photoshop. It is a bit hard to read though.. but doable. Just need to spend some time cleaning it up. 🙂
Copy link to clipboard
Copied
Hi @MikeCL-zZMTaZ,
you answered your question yourself - but it's still not clear.
@MikeCL-zZMTaZ wrote: "… how to create / draw a new simple rectangle to the document? …"
What do you really want?
What is a rectangle in your opinion?
All of this can be done. With Javascript (Adobe ExtendScript) and/or Script Listener Code (Action-Manager-Code = AM-Code). But you always have to describe in detail what you really want. Otherwise you will always get no or wrong answers.
BTW screenshot before and after and/or sample files are very helpful.
Copy link to clipboard
Copied
Yeah.. you're right.. Sorry... It was about a rectangle live shape filled with a color I was after. So I used Javascript (extend script), and in this case, together with AM-Code extracted from the script listener. I will try and be more precise in my questions.. Thanks for pointing that out!
Copy link to clipboard
Copied
In this case, the use of AM code is the right choice.