Wait for external application to finish
I'm using FMP 8.5 and have a script that runs an application created with Automator (it gets a URL from a field in my database and downloads a .pdf file with that name into a folder) and then runs native Applescript code that changes the name of the .pdf file that was downloaded. I need the FMP script to wait for the application downloading the .pdf file to finish before running the Applescript code that changes the file name. I tried using a repeat loop in Applescript to wait for the Automator application to finish running but that seemed to hang up the Automator application waiting to get the URL from FMP.
repeat while application "Download URL" is running
What is the best way to wait for the application to finish before running the Applescript step to change the file name?
If you want a pause in the Filemaker script then there is a 'Pause script' step that can be set to a time that is at least as long as you thing the external application will need.