Ballycroy Posted July 20, 2006 Posted July 20, 2006 (edited) The following script works in Filemaker Pro 8 Go to Layout {"InvoiceViewer"(Invoiceviewer)} Show All Records Delete All Records[] Send Event ["aevt", "odoc"; "cmd/c dir /b M:FolderfolderPDFfolder >c:outputfile.txt"] Pause/Resume Script [Duration(seconds):5] Import Records["outputfile.txt";Add; Windows ANSI] Show All Records But when I create a runtime it fails with the following message: The file "outfile.txt" could not be found and is required to complete this operation If I hit the OK button it allows me to select the file and the script continues. It worked in the previous runtimes I created. Any ideas? Edited July 20, 2006 by Guest
Ballycroy Posted July 20, 2006 Author Posted July 20, 2006 That's odd. I created the runtime on an XP computer and deployed it to a Windows 2000 computer. Works fine on the Windows 2000 computer but not on the XP computer. Got to be a system problem but what?? I know the XP system is set to do automatic updates, I wonder if that has something to do with it?
Wim Decorte Posted July 21, 2006 Posted July 21, 2006 It fails on the import step, right? how's that file reference defined? file:/c:/outfile.txt Sounds like the runtime machine doesn't have enough time with the 5 seconds to finish the text file before the import script needs it. When you use the manual dialog you can see the file because the OS has now finished writing to it...
Genx Posted July 21, 2006 Posted July 21, 2006 You could capture for the can't find file error in a loop and proceed if no error
Ballycroy Posted July 21, 2006 Author Posted July 21, 2006 Probably Pilot Error It fails on the import step, right? Correct how's that file reference defined? file:/c:/outfile.txt For some reason i thought you had to have a file created already. So I created a file and when I selected the file I got the following listing in the File Path List: file:.../../../../outputfile.txt But now when I typed in the reference (as you described above): file:/c:/outputfile.txt It works like a charm. And creates the necessary file. Thanks Wim
Wim Decorte Posted July 22, 2006 Posted July 22, 2006 You're welcome. The .../.../... indicates a relative path with the starting point being where the FM file is. In your case it basically says "go up 4 levels from where I am". When you move the file that is likely to break. hard coding the location works wherever the file is.
Recommended Posts
This topic is 6742 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now