Apple Script to input automatically Estimated Time?

How do I start with this? Any ideas?

Here’s something I modified from this site. It cycles through each item in a selection of multiple. This can get you started.

 tell application "OmniFocus"
	tell front document
		tell content of document window 1
			set SelectedTasks to value of every selected tree
			if ((count of SelectedTasks) < 1) then
				display alert "You must first select an item to complete." as warning
			end if
			repeat with anItem in SelectedTasks
				set estimated minutes of anItem to 5
			end repeat
		end tell
	end tell
end tell