Improved bank pins

checks the bank pin window to see what digit to press, rather than just pressing a digit and going to the next without checking
checks if the window is closed and then closes the script.