I just discovered that Photoshop CS supports scripting in AppleScript, JavaScript and Visual Basic! There's a complete type library available for the Visual Basic developer, and you can use either VBScript or full blown Visual Basic. I'm going to bet