batch inport to FMP
batch inport to FMP
- Subject: batch inport to FMP
- From: "Eric Phillips" <email@hidden>
- Date: Mon, 01 Apr 2002 09:54:04 -0500
I have taken peoples suggestions to move and rename the file then import it into FMP. This works fine until I add the delete statement. FMP is much slower than applescript so by the time FMP goes to look for the file applescript has already deleted it. How can I tell applscript to wait for FMP to finish? I have tried having a Tell FMP block in the main script and tried breaking it out as a separate handler. I am using OSX and AppleScript 1.7.
The second question I have is in the tell FMP block to make it cleaner how do I test to see if FMP is running and the database is open so that I can skip the Open statement if it is already running?
Here is a sample of what I have written. I can't guarantee that all the syntax is correct since I am doing it from memory and I am at work on a PC. The biggest thing I am looking for is how to get applescript to wait for FMP to import the file. Thanks for any help.
Eric
repeat with i in filelist
set thefile to i as alias
set filename to name of i as text
set importfile to "path to the import folder" & filename
tell application "finder"
move thefile to importfolder
set the name of importfile to "importthis.xls"
end tell
tell application "FileMaker Pro"
activate
open "the database"
do script "import records"
end tell
tell application "finder"
delete "importfile"
end tell
end repeat
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.