password protected zip file

I use Hazel to deal with my bank statements.But recently the bank sends statements as zip files protected with password.Trying to use apple script to autofill password while Hazel is running the rule:
“delay 5
tell application “System Events”
keystroke “1234567” & return
end tell”
But it doesn’t work.

Thanks for any help