December 11, 201015 yr Does anyone see where the syntax in this calculated Apple Script is off? It returns two errors: 1. "Expected """" but found unknown token 2. Unknown Error -2741 Here's what the code looks like: List ( "set fileExists to false"; "try"; "do shell script \"-e '" & $path & "'\""; "set fileExists to true"; "end try"; "tell me to set cell \"result\" of layout \"Developer_Settings\" to fileExists" ) What I'm trying to accomplish is simply check if a file exists in a certain location. The $path consists of: Get (FileMakerPath) & "\Extensions\Troi_File.fmplugin
December 11, 201015 yr Author Don't you love it when you can post your own replies...? ;-) I hope this will be helpful to someone. Here's the updated code: List ( "set fileExists to false"; "try"; "do shell script \"test -e '" & $path & "'\""; "set fileExists to true"; "end try"; "tell me to set cell \"_yourfieldname\" of layout \"_yourlayoutname\" to fileExists" ) The variable $path needs to start with "Volumes" for AppleScript to understand. If you're looking to verify a plug-in in the non-shared Extensions folder of your FileMaker installation, this should work: "Volumes" & Get (FileMakerPath) & "Extensions/_yourpluginname"
December 11, 201015 yr Notice that there are single quotes surrounding rheinport's path (hard to see). You'll need to keep those, or the phrase "quoted form of", surrounding your path to keep it Unix safe, if there are any spaces in the path.
Create an account or sign in to comment