Projects of Pain
Photo Border Script
With the introduction of Photoshop CS*, scripting has become an easy to access and very powerful feature of Photoshop (and no doubt other CS suite products.)
Introduction | Download | Installation | FAQ | License | Support
Introduction to PS Scripts
Scripts are similar to Actions in the sense that they automate (often repetitive) tasks, but are much more powerful. Where Actions only can record your interaction with menus and record the settings you used, scripts can actually analyze the state of a document and make intelligent decisions on how to proceed. For example, a script could draw an evenly distributed checker pattern on any size of document - a task that is virtually impossible to do with Actions.
Scripts can be written in JavaScript (for both Mac/Win), Visual Basic (Win), or AppleScript (Mac). Each has their own advantage, JavaScript's being that it works on both Mac and PC systems - the person only needs to have Photoshop. The Visual Basic and AppleScript languages are platform specific, but add a lot of extra functionality (like being able to launch other applications or interact with a web server, etc.)
Download Script
| Title / Download | Description | Version |
|---|---|---|
| Photo Border | This script creates a border around any image in Photoshop and places a copyright/signature to the bottom-right of the image. The border is two stage, with a thicker outer border and a thin inner one of a different color. You can customize all of these settings. I use this standard border for my photography images. | v1.0 |
Installation
To install a Photoshop CS script, unzip and copy the .js file into /Presets/Scripts/ in your Photoshop CS program folder, e.g:
C:\Program Files\Adobe\Photoshop CS\Presets\Scripts\
...or for CS3 users...C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scripts\
FAQ
Q: Can I customize Photo Border to use my signature?
A: Yep, you can. There are two pretty easy steps to do it.
The script is a plain text file, so you can edit it in any text editor, like notepad. When you go File->Open in Notepad, you may have to set File Types down at the bottom of the dialog to *.* so it shows all files (this way you can open the script file).
STEP 1: Change the signature:
Find "signatureText" on line 47 of the script. You'll see the signature in quotes to the right of the equal (=) sign. Change that to whatever you like. Keep the quotes around it. For example, right now it is:
signatureText = "© 2003 Richard Podsada";
You could change it to:
signatureText = "© 2004 John Smith";
STEP 2: Adjust the right margin:
On the very next line after the signature, you'll find signatureOffsetX:
signatureOffsetX = 138;
This is how many pixels the left edge of the text is from the right edge of the picture. To keep it tucked in the right corner: Shorter signature = less pixels, Longer Signature = More pixels.
Personally I just tweaked it until it was right. Change it, save the script, run it, change it.. and so on, until your signature is where you want it. Or, you could sign your picture "manually" in the same font/size, and measure where it has to be approximately.
There may be a more efficient way to right align this, and when I get time to script more I'll see if I can make this process easier. But I hope that helps for now!
License
These scripts are free for you to use, customize and modify to your liking. However, you may not sell them, include them as part of a commercial product, or make profit on them in any way. You may not redistribute them in their original form, but you may distribute your own versions of the script, provided that my original copyright message and link to my website remains in the script's header.
Support
I can only provide minimal support for the scripts, since I am only learning Adobe Scripting myself. Contact me if you have a question or suggestion to improve any of my scripts.
* NOTE: You can download a scripting engine plug-in for Photoshop 7 also.
