Use P4 password inside scripts

We have a requirement where we would like to run p4 have to determine the file revision of all the files.
How can i get access to the P4 password or implement a "p4 have" if i can't ?
Thanks

Please sign in to leave a comment.