-- Copyright 2002-2008.  Adobe Systems, Incorporated.  All rights reserved.

tell application "Adobe Photoshop CS4"
	activate
	
	set doc to make new document with properties {width:7 as inches, height:5 as inches}
	
	-- Select the left half of the document. Selections bounds are always expressed
	-- in pixels, so a conversion of the document's width and height values is needed if the
	-- default ruler units is other than pixels. The statements below would
	-- work consistently regardless of the current ruler unit setting.
	
	set x2 to ((width of doc as pixels) as real) / 2
	set y2 to (height of doc as pixels) as real
	select current document region {{0, 0}, {x2, 0}, {x2, y2}, {0, y2}}
	
	copy selection of current document
	
	make new document with properties {width:x2 as pixels, height:y2 as pixels}
	
	paste
	
end tell
