access preselected Finder items for Applescript Contextual Menu Item?

Hi I am trying to make a Contextual Menu Item to resize images using an AppleScript with Image events via Automator. Instead of having a script select files by invoking a choose file dialog, how do I make the files I want the script to run to be the files I have just selected in a Finder window before right clicking to select the Contextual Menu Item?