in reply to Help with script

These are NOT direct answers but may be of some help: