AnsweredAssumed Answered

Error message  is illegal as a formal parameter. unknown error -2716

Question asked by theresab on Jun 4, 2010
Latest reply on Jun 8, 2010 by TSGal

Summary

Error message  is illegal as a formal parameter. unknown error -2716

Description of the issue

FileMaker Product(s) involved:FileMaker Pro Advanced 11.0.1, FileMaker Pro Advanced 10.0.3Operating System(s) involved:Mac 10.6.3 Detailed description of the issue:The error message  is illegal as a formal parameter. unknown error -2716 is encountered when running the apple script from inside filemaker pro.Exact steps to reproduce the issue:1. In an existing or new database, create a new table like "AppleScripts" with a text field. 2. Add the script below as a new record in this table. Edit the below script as needed, but keep the parameter find in the function replaceText set FilePath to my replaceText(":", "/", theFilePath) on replaceText(Find, ReplaceWithThis, ThisSubject)--some codes hereset text item delimiters of AppleScript to Find--some codes herereturn ThisSubjectend replaceText 3. Create  new FMP script and insert a perform apple script command to run the created script above.4. The described error message will be encountered.5. Run the exactly the sample apple script in Apple Script Editor. 6. It should run as expected (without errors) 7. From the understanding that "FIND" is a reserved FMP word, replace the script parameter to something like on replaceText(theFindString, ReplaceWithThis, ThisSubject), update the script as needed.8. Run the fmp script that performs the apple script and run the same in Apple Script Editor. There will be no error. Expected Result:If exactly the same apple script is run regardless of whether in FMP or Apple Script Editor, it should produce the same. Actual Result:As above. Exact text of any error message(s) that appeared:As above. Any workarounds that you have found:do not use the word/string  FIND (and probably other FMP reserved word) as a parameter in apple script, although it may run correctly in Apple Script Editor, an illegal parameter error will be encountered in FMP that perform the apple script.

Outcomes