Sorry! you are right here gose the hole story.
I am trying to develop a AppleScript that will trigger a Filemaker script from FileMaker to another Filemaker in a remote computer. I first developed a Simple Script and pasted into a global Script to activate it. The Script looked like this:
tell application “FileMaker Pro” of machine “eppc://guest:password@000.00.00.00”
do script “The Script”
end tell
This worked OK but if the Filemaker has a dialgo or is doing a sort or printing the AppleScripts waits for the appplication responce from the remote computer, as a result we get a script that could delay for a long time. I then added some extra code to my script:
ignoring application responses
tell application “FileMaker Pro” of machine “eppc://guest:password@000.00.00.00”
do script “The Script”
end tell
end ignoring
This works OK only if it is run from an AppleScript application BUT once pasted into a FileMaker Script it does not work like it should and again it will wait for the application responce.
My next idea was to create an AppleScritp in all remote coputers that will always be opened and I could be tringer from a remote coputer The scripts look like this:
1- Local Computer AppleScript:
tell application “Script01” of machine “eppc://guest:password@000.00.00.00”
run
end tell
2- Remote coputer AppleScript (stay open AppleScript):
tell application “System Events”
set XXXX to name of every application process
if XXXX contains “FileMaker Pro” then
try
ignoring application responses
tell application “FileMaker Pro”
do script “The Script”
end tell
end ignoring
end try
end if
end tell
3- The Script to trigger in filemaker:
Fluch Cache to disk
if( test is valid)
Go to layout 1
else
go to layout 2
end if
Refresh
This worked OK but while beeng betatested some bugs came out:
Bug 1- If the Filemaker Application is not the front application it comes out the dialgo that we all know. and to answer the question you made once you bring Filemaker to the front the Script is triggered with no problems.
Bug 2- if the Filemaker window is collapsed it will not trigger the script
ho! and just for the record I replace the FileMaker Script with a “beep” and it still does the same.
Well I think thats the hole story!
Thank you for your time!
Brian Donovan
Mexico City