Jump to content
Server Maintenance This Week. ×

How to get FM to return a value to an Applescript


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

Recommended Posts

I have an Applescript that runs a FM script via the 'do script' AppleScript command. What I want is for the FM script that runs to do some work and then return a text value back to the AppleScript. The last step of the FM script is 'Exit Script' with a text 'result' value set.

The problem is that the 'do script' AppleScript step is not returning the FM Script's 'result' value -- presumably because the return value is only getting passed to a calling FM script, not an AppleScript.

I'm wondering if there is some other way to do this. Obviously I could have the Applescript proceed on, wait awhile, and then check either a FM global var or the clipboard for a return value. But both of those options are problematic. I am hoping to get a direct return value from FM.

Here is my applescript code:

tell application "FileMaker Pro Advanced"

tell document 1

set myvalue to do script "myFMScript"

end tell

end tell

Whenever this is run, I get an error stating that 'do script' does not return a value.

Thanks. John

Edited by Guest
Link to comment
Share on other sites

This topic is 5781 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.