EscapeForOsascriptShell ( escapeThis )
Escapes a value so that it can be used in a nested AppleScript/shell/AppleScript command
Average rating: 4.4 (35 votes) Log in to vote
Daniel A. Shockley
EscapeForOsascriptShell ( "double-quote: \"Hello World\" - done" )
double-quote: \\\"Hello World\\\" - done"
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Escapes a string or number so that it can be used in a Perform AppleScript that runs a "do shell script" that uses the osascript command to then run the AppleScript.
Reason? It means that you can send an AppleScript command to an external applet that does not wait for a response, which means the FileMaker script will no longer be locking up FileMaker, preventing that external script from working with FileMaker.
For more, see the following: http://forums.filemaker.com/posts/df3f5b2f9e
Basically, this aids in using a work-around for the fact that "Send Event" is broken in recent Mac OS X versions and that you can't have "Perform AppleScript" ignore the results and continue the script without waiting for the AppleScript to finish.
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.