photoshop actions

I have a Photoshop action that downsizes large16 bit camera files to 8 bit A4 print size. Can a script be added to the action so that it is possible to rotate an image if it is horizontal so that "fit image with 3500 pixels H X 2480 pixels W will not down size the image to much andthen run the acton ignore rotate file if it is already vertical If so does someone have a script they can share. I do not have automator on the machines i wish to run this action and wont have it until our IT department can get their act together to roll out Tiger
thanks in advance
Garry

You would probably want to have a script that runs and calls the action or better yet does everything. You could make it as a drag and drop for a single file or with the proper lines to batch files/folders dropped onto the script.

Set up an apple script to open the image and then rotate then call the photoshop action you require. The script will only rotate if the image is landscape.This will work for CS as well


tell application "Adobe Photoshop 7.0"
			activate
			open this_image
			set x to width of document 1
			set y to height of document 1
			if x is greater than y then
				rotate canvas document 1 angle -90
				do action "xxx" from "zzz"
			else
				do action  "xxx" from "zzz"
			end if
		end tell
end tell

Put this in a repeat clause and you can batch process. The this_image variable must be a alias reference to the image.