Scripting PhotoShop CS2

I would like to do a script to use in PhotoShop CS2 that would ask for a jpg photo or multiiple photos or folder and it would then do a “Smart Sharpen” on the photos.
If this is possible could someone please show me how to go about this task.
Thanks, PolishPrince

play around with this one (includes droplet-handler for many files or a folder):

on processAFile(aFile)
	tell application "Adobe Photoshop CS2"
		open aFile
		set filterOptions to {class:filter options, amount:150, radius:0.5, threshold:0}
		tell front document
			filter every layer using unsharp mask with options filterOptions
		end tell
	end tell
end processAFile

on ProcessAFileOrFolder(theFile)
	--set theFileInfo to info for theFile
	--if folder of theFileInfo then
	if (theFile as string) ends with ":" then
	end if
end ProcessAFileOrFolder

on ScanAFolder(theFolder)
	set fileNames to list folder theFolder without invisibles
	repeat with aFile in fileNames
		set theFile to (theFolder as string) & contents of aFile
		ProcessAFileOrFolder(alias theFile)
	end repeat
end ScanAFolder

on open of filesList
	repeat with aFile in filesList
		ProcessAFileOrFolder(contents of aFile)
	end repeat
end open

on run
	set theFile to choose file
end run

Greets from

Thanks to TMA, the script worked just as i wanted it to. Can you direct me to other samples or literature that would show scripting of other menu items. I am new to this and have a hard time getting the right syntax to do things i want to accomplish.
Thanks again, PolishPrince

u can find a few pdf’s in your installed Photoshop Directory. like: AppleScript Reference Guide.pdf or Photoshop Scripting Guide.pdf

in your scripteditor u can open a dictonary of any program that is scriptable.

greets from