detect name of the files dropped on folder

using the “drop files on folder” script, how do I detect (and set to variable) first 5 characters of the file name of files being dropped?? (All files will always start with the same 5 characters)

Is that a Folder Action script? If so, try something like this:

on adding folder items to thisFolder after receiving addedItems
	set fiveChars to (characters 1 through 5 of (first item of addedItems)) as text
	display dialog result
end adding folder items to

…it should work, but it doesn’t. I don’t get a messsage box with result

I’m on 10.3.9 by the way

any ideas anybody