• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do script in FileMaker 12
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do script in FileMaker 12


  • Subject: Re: do script in FileMaker 12
  • From: Lists <email@hidden>
  • Date: Fri, 21 Dec 2012 21:02:25 -0800

On Dec 21, 2012, at 7:04 PM, Wayne Melrose <email@hidden> wrote:

Just a thought, try making a new script with the same name. I found upgrading some db's I had to make a few adjustments like this. 

Also, I thought is was just 'do script' ?


From the FileMaker Apple Events Reference:

What can I do with it?
Use the Do Script event to trigger a script in the FileMaker Pro Scripts menu.

To use the Do Script event you need to provide an object specifier for a script, like FileMaker script 1, or last FileMaker script, or FileMaker script "Print Sales Report". (You must always refer to a script object as FileMaker script <x>; the word "FileMaker" is part of the name of the object.)

You may find it useful to write a script that restores complex finds, sorts, import orders, and page setups, and then call the script to do the work for you, particularly if printing is involved.  For example, FileMaker Pro scripts have the ability to restore page setups a feature that is not available to Apple events.  

Note: the Do Script event is successfully completed when the FileMaker Pro script begins. Because FileMaker Pro is unable to process Apple events while a ScriptMaker script is running, it is possible to receive a timeout error when sending events to FileMaker Pro after sending a Do Script event.  Here are some suggestions to help avoid timeouts:

1) lengthen the timeout period (the default is 60 seconds) using a statement such as with timeout of 600 seconds
2) implement a flow control mechanism by using ScriptMaker to send an event to the applet to continue with the next Apple event to FileMaker Pro.
3) use a routine to continuously send events to FileMaker Pro and continue only when FileMaker Pro is ready.  Call the WaitUntilReady routine after sending the Do Script event and before sending another event to FileMaker Pro. Here is an example of such a routine:

on WaitUntilReady()
with timeout of 5 seconds
repeat
try
    tell application "FileMaker Pro" to get version
    return
on error number errnum
end try
end repeat
end timeout
end WaitUntilReady

Note:  Since only one ScriptMaker script can be run at a time, any scripts called using the Do Script event when running your AppleScript using the Perform AppleScript ScriptMaker step will get executed after the ScriptMaker script has completed.

Examples

You can say:  If you want to perform:
tell application "FileMaker Pro"
do script FileMaker script 1 -- the first script
do script last FileMaker script -- the last script
do script FileMaker script ¬
"Print Sales Report" -- a script by its name
do script FileMaker script after ¬
FileMaker script 1 -- the second script
do script FileMaker script before ¬
FileMaker script 3                                  -- the second script
do script (every FileMaker script ¬
whose name begins with "aName") -- all scripts meeting a test
end tell


J
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >do script in FileMaker 12 (From: David Crowe <email@hidden>)
 >Re: do script in FileMaker 12 (From: Wayne Melrose <email@hidden>)

  • Prev by Date: Re: do script in FileMaker 12
  • Next by Date: Re: do script in FileMaker 12
  • Previous by thread: Re: do script in FileMaker 12
  • Next by thread: Re: do script in FileMaker 12
  • Index(es):
    • Date
    • Thread