How to write XTA command scripts