No way to do this if you are using different passwords for each file.
The only way I can think of is to run a script to pass characters to the system as keystrokes. Basically you will be scripting the clicks, and have a separate file with the different passwords that the scripts pulls down. The issue here is you need to know exactly what password got applied to what file, which will be pretty much alphabetical. And need to execute the clicks, and time to make sure that there is a file is open at the time you pass the password keystrokes to the window.