I'm not exactly clear whether you want to pass each entire file to your external tool, or whether you want to open each file and then pass it line by line. I guess probably the former. If that's the case, then perhaps this example will help.

Sorry @Darren the program doesn't seems to work because its asking for two input files
first input file is the exterior script(written already)and the second input is the PDB files.
So,i think incorporating a function which calls the script file first followed by the PDB files will help. So, could you please tell me how to do this?

http://www.major.iric.ca/MajorLabEn/MC-Tools_files/MC-Annotate.zip here is the tool, i want to embed this tool and give the inputs to the tool, the web version of this tool looks like http://www.major.iric.ca/MC-Search/

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other