If you are new to scripting for Photoshop, please view our Photoshop
Scripting Basics tutorial for an introduction to Photoshop scripting and a few exercises
about basic JavaScript.
1. Check for an opened document so that this script
will only run if there is an opened document.
|
|
| |
|
2. Type in add(); to tell the script we
want to add something.
|
|
| |
|
3. Now we can tell the script that we want to add a
layer. Type in artLayers followed by a period.
|
|
| |
|
4. Finally, we need to tell the script which opened
document to add the layer to. Type in activeDocument followed by a period.
|
|
| |
|
5. We can also create a name for the layer. Type in .name
= followed by the title. Because the title is a string, don't forget to add quotations
around it.
Save the script and run it inside Photoshop (File> Scripts> Browse). If the script does nothing, it means that you don't have any documents opened for it to create a new layer for. |
|





More Photoshop: