Jump 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.

pausing filemaker script for applescript to finish

Featured Replies

How do get a Filemaker script to wait while I have a Perform Applescript step convert a long audio file using iTunes. I need filemaker to wait because the rest of the filemaker script uses the results of the applescript step. I would like to do this without user input.

thanks for any ideas

I'm no AppleScript expert, but could you get the AppleScript to invoke a FileMaker script when the AppleScript has completed execution?

If you can then you can split your FM script in two parts.

  • Author

I never thought of that. I don't know if applescript can activate a filemaker script.

thanks for the idea.

I was thinking maybe using a Loop script step that checked a filemaker field for the word "done". I would have the applescript set the filemaker cell to "done" when the applescript finished

do script FileMaker script "script name"

That is the syntax for the command. You'd want this inside a tell database block, or have the file open and frontmost.

That is the way to do it. Both FileMaker and AppleScript internally will wait for one operation to complete before moving on to the next. So it's best to pass off control to the one who's doing a long operation, then let it call the other.

  • Author

So I just want to understand something.

The Filemaker Pro script will wait for the Perform Applescript step to finish before going on to the rest of the Filemaker Pro script?

Does that happen even if the Perform Applescript step takes up to 5 minutes to complete?

Well, I'd hate to say it "always" does. It sort of depends what the AppleScript started. But I think I can say that FileMaker waits until the AppleScript thinks it's done. I've had very few problems with the method of using Perform AppleScript to run an AppleScript, which at the end calls the next FileMaker script (by name).

  • Author

Maybe I just don't see this problem clearly, but

If the filemaker script will wait for the perform applescript step to finish before going onto the next filemaker script step...

then why split up the Filemaker script and have applescript call the next Filemaker script?

Is it a speed or reliability issue?

Reliability. It depends on what the AppleScript is doing; usually more specifically what the other app is doing which AppleScript told. If the other app returns satisfactory "I'm working; now I'm done" to AppleScript, then good, you don't need to call a FileMaker script, as the implied "wait until AppleScript is done" would handle it.

If on the other hand, AppleScript has issued a command which the other app is not going to tell AppleScript about, then you might need to call the next FileMaker script from the AppleScript; also checking within the AppleScript itself to see if it is done.

AppleScript is both an OS app, and an implementation within each application which supports AppleScript.

Basically, you only want to implement a call for the next FileMaker script in a Perform AppleScript if you need to; which would be rare. But you should not count on AppleScript always telling FileMaker that everything is done. You should test with with a maximum load on AppleScript for your task, and see what happens (or not). Sorry, I just don't know or can't remember particulars.

  • Author

I see what you are saying.

In my case the perform applescript step is calling iTunes to convert a AIFF file to an mp3 file. Applescript then sets a field in Filemaker to the converted mp3. It has worked well with short files, but I need to test it with large AIFF.

It seems like the limiting factor is the interaction between applescript and the application it is calling.

thank you for all of your input.

Create an account or sign in to comment

Important Information

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

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.