serializing search

I am using "Entrex ESearch" protocol provided in the Pipeline Pilot's sample examples (attached). This protocol,  along with doing many other things, also take any single chemical name  (e.g. aspirin or Lipitor...) as input and search PubChem Compound  database and giveout series of information like Smiles, MW, InChi, CID,  etc.

My question is instead of going through each such chemical  name separately what is the best way that I read a text file that  contain series of chemical names and get output together in one file using this protocol [  i.e. how do i make the protocol go in loop reading each entry from text  file one at a time..]

Would appreciate any suggestion (or sample protocols) on this from all the experts/users.

Thank you

nar