How to make AppleScript wait for FileMaker to complete a script?
How to make AppleScript wait for FileMaker to complete a script?
- Subject: How to make AppleScript wait for FileMaker to complete a script?
- From: Dennis Jones <email@hidden>
- Date: Thu, 31 Mar 2005 08:57:35 -0800
In the AppleScript below, I need to make the AS script wait while a
FileMaker script runs. The duration of the FM script varies from a few
seconds to over a minute.
At present, some import files are replaced before FileMaker can import
and process them.
Is there something I can replace the 'sleep 10' command with that will
monitor FileMaker and let AS know when it can continue the loop.
--
Dennis Jones
email@hidden
-- code --
on getImportFiles(sourceFolder, importFile, importFolder, scriptToRun)
set the itemList to list folder sourceFolder without invisibles
set sourceFolder to sourceFolder as string
set search_string to "CATHY-H"
repeat with i from 1 to number of items in the itemList
set thisItem to item i of the itemList
set thisItem to (sourceFolder & thisItem) as alias
set thisInfo to info for thisItem
-- Set file name to currentName
set the currentName to the name of thisInfo
if folder of thisInfo is false and ¬
alias of thisInfo is false and ¬
currentName contains the search_string then
copyToImportFolder(sourceFolder, importFolder, importFile, currentName)
tell application "Finder"
update folder importFolder with necessity
end tell
do shell script "sleep 1"
tell application "FileMaker Pro 6"
do script scriptToRun
end tell
do shell script "sleep 10" -- Needs to be "Wait until FileMaker is done"
end if
end repeat
end getImportFiles
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden