Applescript getURL does not wait until the database is open to return a result
FileMaker Pro Advanced 11.0v2
Operating system version
Description of the issue
getURL does not wait to return a result, therefore any code after this can fail.
Steps to reproduce the problem
tell application "FileMaker Pro Advanced"
return (name of window 1) --fails sometimes because the database window is sometimes not shown, because the database in not open yet. (long opening times, slow servers, scripts that run on database open, etc... (sometimes more apparent when the application is not running before opening a database via getURL)
getURL should return a reference to the database opened, or at the very least true or false as to if the database is open and accessible. In the above example, if the database cannot be opened, the getURL line should return the error, not the next line.
getURL return nothing immediately, and the database cannot be communicated with
loop handlers sub-routines and delays help, but it's still tricky at best.