October 11, 200421 yr 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 -- 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)
November 23, 200421 yr Author 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???
November 23, 200421 yr 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.
Create an account or sign in to comment