Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Windows Send Event can't keep up with ScriptMaker

Featured Replies

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

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.

  • 1 month later...
  • 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

  • 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

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.