From reading on the 'Net it seems many CS2 scripts should work on later versions of Photoshop. If you would like to test a couple of early scripts I can upload them. One of them removes pixels from the left side of an image.
I have a reason for removing pixels.
I'm very early on the learning of the Java scripting for Photoshop but it's not really hard given the scripts posted all over the 'Net.