Hi David,
Running an external command with :!
or a user-defined :command while selection is active is enough. For example (list of files as arguments):
nnoremap <silent> ,s :!script %f<cr>
If you want list of files on stdin, use %Pl macro instead:
nnoremap <silent> ,s :!script %Pl<cr>
I didn't really understand what you meant by
"$1"/"$files" stdin script
Please clarify if the above doesn't answer your question.