Hello, my name’s Alex and I’m a videomaker and minor geek.
I’m currently writing a little script that uses a “do shell script” command in order to process a chosen file with a unix executable.
What is supposed to happen is that you drag the file-to-be-processed onto the script application, and it runs a shell script after which the shell script quits and the applescript too. It’s really simple. Here’s my code:
on open this_file
set fileName to quoted form of POSIX path of this_file as string
do shell script "/Applications/The Name And Location Of The Executable " & fileName
end open
“The Name And Location” etc. is an actual name and location (I don’t think there is anything wrong with that path or its formatting so I’m leaving it out so I can maintain a wee bit of privacy about my project).
So, what happens when something is dragged onto this script is that it launches and the file is processed 100% correctly by the executable – everything works perfectly, except that then the script hangs with the spinning beachball of death and has to be force-quit.
Does anyone know why the script freezes after successfully accomplishing its goals?
Many thanks in advance for any assistance,
Alex