-- Copyright 2002-2008.  Adobe Systems, Incorporated.  All rights reserved.
-- This script shows how to trim the frontmost document

tell application "Adobe Photoshop CS4"
	activate
	if ((count documents) < 1) then
		display dialog "You must have at least one document open before running this script"
		return
	end if
	trim current document basing trim on top left pixel with top trim and right trim without left trim and bottom trim
end tell
