cropping image file in applescript

I have been working on a script that takes a photo of a webpage and cuts it into two images for icon artwork.
I first did this task in automator which worked great but I need to create an applescript to attach it to Audio Hijack to launch it.
For this reason I want to create the task in applescript.
So far I have this script

tell application "Paparazzi!"
	set minsize to {859, 625}
	set filename to "ttbookpic1.jpg"
	set iconame to (true)
	capture "" min size minsize
	repeat while busy
		-- To wait until the page is loaded.
	end repeat
	save as JPEG in "Macintosh HD:Users:username:desktop:temp files:" & filename icon iconame
	quit application "Paparazzi!"
end tell

from here I wanted to take the results and crop the image but not centered.
In my automator action I used proppercropper.action
Here I’m pretty stuck because there is no dictionary for the action and I’m not sure how to crop without it.
I could use this but I don’t know how to find the input or parameters

on run {input, parameters}

I have also tried this

tell application "Automator"
	set pixelist to {100, 206, 154, 146}
	execute "Nautilus HD:system:library:Automator:proppercropper.action"
end tell

but I don’t know how to get the input into the program.
It’s looking for a jpeg image file and the four pixel locations of the crop.

There’s a couple applescript tools for cropping. The built-in Image Events can crop but only to the center of an image. Imagine Phot says it crops anywhere but I never used it so you’ll have to check it out for yourself… it’s free by the way.

see it here:

For instructions on Image Events go here:

Image events does everything about the center, unfortunately: it pads as well from the center. That combination makes it impossible to crop off-center.

I built this much at one point to select the portion I wanted to crop using Xtools.osax and Preview and only then (like an idiot, figured out that Image Events was crippled). Might help with some other app., though.

-- requires XTool.osax by J-B LeStang: (

set SelectedBnds to {}
set saveTarget to path to desktop
-- Open the pic in Image Events and
set thePic to alias (((path to documents folder) as text) & " WorkInProgress:Melmerby at Sunset.jpg")
tell application "Image Events"
	set tImage to open (thePic as string)
	set PicDim to (dimensions of tImage)
end tell
tell application "Preview" to open thePic

-- Get location of image on screen in Preview window, corrected for Title bar and Toolbar
tell application "System Events" to tell window 1 of process "Preview"
	set TopLt to position -- screen coordinates of top left of Preview window
	set BotRt to size -- coordinates of bottom right of window with respect to top left corner
	tell TopLt to set item 2 to (item 2) + (item 2 of BotRt) - (item 2 of PicDim) -- adjusted for window top
end tell
-- Get bounds of rectangle to which to crop image
set MsgInsert to {"top left", "bottom right"}
repeat with k from 1 to 2 -- get top left and bottom right crop area coordinates
	display dialog "Place the cursor at the " & item k of MsgInsert & " of the area you wish" & return & "to select in the image." & return & return & "Then press 'Enter' without moving the mouse." buttons {"Do Not Click This Button - Press the 'Enter' Key"} default button 1
	-- check mouse in bounds, store valid point
	repeat with k from 1 to 2
		set pt to (item k of (mouse location)) - (item k of TopLt)
		if pt < 0 or pt > item k of BotRt then
			display dialog "Your cursor was not in the image" & return & return & "Remember to use the Enter key!" & return & "Don't click the dialog button." buttons {"OOPS"} default button 1 with icon 0
			set end of SelectedBnds to pt
		end if
	end repeat
end repeat
Image Events can only crop an image to the dimensions given centered on the original image; the dimensions given are split evenly about the center. Unfortunately padding is from the center as well.
tell SelectedBnds to set SelectedWH to {(item 3) - (item 1), (item 4) - (item 2)}
tell SelectedWH to set SelectedCtr to {(item 1) / 2, (item 2) / 2}
tell PicDim to set PicCtr to {(item 1) / 2, (item 2) / 2}

imagine photo has a automator action that does this nicely. in automator you put in the image you want editted, the there are four boxes for the pixel location to crop. I need to know what input and parameters i need to put in it to make it run properly and how to write the code to do it.
I have no experience with this.