set numberOfTries to 1
set isFileMakerReady to false
repeat until isFileMakerReady
if numberOfTries = 3 then
exit repeat
end if
try
tell application "FileMaker Pro Advanced"
activate
go to database "Call Log"
set data cell "g_Dialectic_Number" of table "Call_Log" to "711-222-3456"
set data cell "g_Dialectic_Name" of table "Call_Log" to "contact_name"
do script FileMaker script "Dialectic Caller ID Lookup"
set isFileMakerReady to true
end tell
on error e
display dialog "Error: " & e buttons {"OK"} default button 1 with icon 0 giving up after 30 -- for testing only
delay 5
set numberOfTries to numberOfTries + 1
end try
end repeat
The problems I'm seeing are:
1] the loop is not exiting
2] the display dialog that I added for testing purposes to the on error handler is never shown
3] when FileMaker does become free, I get double entries in the db
4] FileMaker is no longer coming to the foreground when this script is triggered
What am I doing wrong?
Thanks,
Marc