January 16, 200521 yr Can any of you Windows wizards help me out? I am looping through a found set and calling a Send Event on each one. Trouble is, the Send Event for record 1 is still executing when the Send Event for record 2 is called. Since I am appending echoed text to a file, the data from different records is getting dovetailed together. Not good. Here is the calculation I am calling with Send Event: "cmd /c echo & Substitute ( Contact Info ; "r" ; " >> c:" & New Filename Global & " & echo " ) ( "r" is actually the paragraph symbol in the real script ) So, the calc result on a typical record would be somthing like: cmd /c echo Name: Jetson, George >> c:myFile.txt & echo Company: Slate Gravel >> c:myFile.txt & echo Address: 246 Sycamore Street >> c:myFile.txt & echo City: Decatur >> c:myFile.txt & echo State: GA >> c:myFile.txt & echo Zip: 30030 Is there anyway on Windows to make FileMaker wait for a response from the Send Event script step? On the Mac you can specify "Wait for event completion before continuing" - I find no such option on the PC. Putting a FileMaker Pause script step solves the problem, but the minimum delay is 1 second, so for 50,000 records... well you can do the math. If I can't make FMP wait for a reply, maybe there is a way to rewrite the batch script to be quicker... Thanks for any help, j
January 18, 200521 yr One option would be to have Send Event call a batch file that writes a 1 to another txt file when it completes. The batch file would accept the passed parameter and perform the operation. FM would run a loop, importing the text file into a global after each pause and only continuing when the global contained 1. Of course, the batch file would need to write a zero to the txt file before performing the other operations and FM would set the global to zero at the beginning of the script.
March 7, 200520 yr Author Thanks for the reply - I was looking for something a bit more lightweight, but your suggestion would probably work. Ultimately, the need for the functionality I described went away, but thanks anyhow. Thanks, j
March 7, 200520 yr Author Thanks for the reply - I was looking for something a bit more lightweight, but your suggestion would probably work. Ultimately, the need for the functionality I described went away, but thanks anyhow. Thanks, j
March 7, 200520 yr Author Thanks for the reply - I was looking for something a bit more lightweight, but your suggestion would probably work. Ultimately, the need for the functionality I described went away, but thanks anyhow. Thanks, j
Create an account or sign in to comment