I had to do an Applescript and by the end of it i just want to run a python script.
I wrote
do shell script "/Users/Tom/Desktop/ayscript.py"
But it's said "permission denied"
Any idea ?
You are trying to run the script directly instead of using Python to run it. You need to do shell script python
, passing the path to your script as an argument.
do shell script "python /Users/Tom/Desktop/ayscript.py"
来源:https://stackoverflow.com/questions/23108335/how-to-run-a-python-script-inside-applescript