0

I am creating labels in Photoshop CS6. Each label needs to be consecutively numbered. I have a layer that holds the number in which needs to be changed on each label.

I would like to print each label multiple times per sheet. IE. sheet #1 should contain numbers 1 - 12, sheet #2 should contain numbers 13 - 25...

Is there any way to do this with a script in photoshop? Action script or something? I'm not familiar with scripts in Photoshop, nor how or where to implement them.

Is something like this possible? If not, are there any better suggestions?

Thank you in advance!

andrewdotn
  • 32,721
  • 10
  • 101
  • 130

1 Answers1

1

All right, so you’d like to get started with scripting Photoshop?

Adobe’s website has a page for Photoshop Scripting. For each different version, there is an introductory guide and a reference manual with all the details of the object model.

You’ll be writing code in JavaScript. Technically you can also script Photoshop using AppleScript on the mac and VBScript on Windows, but JavaScript works cross-platform, you probably know it better than the other languages, and it’s much easier to find help for.

The program ExtendScript Toolkit got installed on your computer when you installed Photoshop. It’s an IDE for scripting Adobe applications. Launch it. In the Scripts panel, select Photoshop as the target, and you’ll see that several Photoshop features like “Merge to HDR” and “Photomerge” are implemented in JavaScript, and you can view their source code.

enter image description here

To get started writing your own scripts, create a sample image in Photoshop:

enter image description here

Then go to ExtendScript Toolkit, set the script target to Photoshop in the upper-right-corner dropbox box, and play around in the JavaScript Console:

enter image description here

By playing around, you’ll find that you can change the text with this JavaScript:

app.documents[0].artLayers[0].textItem.contents = "hello 2"

enter image description here

If you’re happy with the script, save it, and then you can run it from Photoshop using File → Scripts → Browse…


Once you know the basics of scripting Photoshop, solving your labeling problem should be a lot more straightforward. You’ll probably want to start by creating a new document for each page that will be printed. Then for each label, copy the elements of the template file into the document for the page that the label should be printed on. Adjust the positions of the elements, and change the text to match the label number…

andrewdotn
  • 32,721
  • 10
  • 101
  • 130
  • Thank you. Not the answer I was looking for, but you got me started on the right track. Plus, that's the most visually appealing answer I've seen. Thanks again! I got the problem solved. – brandon-estrella-dev Jun 19 '13 at 01:54