using applescript to automate main.py