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

tell application > tell database > do script


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

Recommended Posts

Posted

Doesn't the following handler correctly express the database to which I am addressing the 'do script' command? According to the behavior (it always runs the script within "People.fp5") and the event log below, the "tell database" statement is being ignored. This is part of a stand-alone applescript.

Thank,

Chap

on export(theDatabase)

display dialog "theDatabase is currently: " & theDatabase

try

tell application "FileMaker Pro"

tell database theDatabase

do script gFMExportScriptName -- constant, set to "Export"

end tell

end tell

on error myErr

display dialog myErr

end try

end export

-- Event Log --

B)

tell current application

display dialog "theDatabase is currently: Courses.fp5"

{button returned:"OK"}

end tell

tell application "FileMaker Pro"

do script "Export"

end tell

B)

  • 1 month later...
Posted

Mandu,

I feel your pain, buddy. I'm having the same problem, I think:

I have an AS loading an Invoices and a LineItems db. I'm able to reliably fire off FM scripts in Invoices with expressions of the form:

tell application "FileMaker Pro"

tell database gFMPInvoicesTable

do script gFMPDisplayProgressScript

end tell

end tell

But the following, addressed to my LineItems table, always gags on the 'do script' command, with "Object not found."

tell application "FileMaker Pro"

tell database gFMPLineItemsTable

try

do script "Relookup"

on error myErrMsg

display dialog "WTF? " & myErrMsg

error myErrMsg

end try

end tell

end tell

If it reached "Relookup" I'd see a big "Welcome" message, so I know I'm not getting that far.

Wonder how to do it???

Posted

What does work is the more correct term:

do script FileMaker script "Relookup"

Though just "do script" doesn't create an error, it always just runs in the last active database file.

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