Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5403 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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?

Posted

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

Posted

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?

Posted

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.

Posted

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.

This topic is 5403 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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