innodat Posted December 11, 2010 Posted December 11, 2010 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
innodat Posted December 11, 2010 Author Posted December 11, 2010 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"
Fenton Posted December 11, 2010 Posted December 11, 2010 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.
Recommended Posts
This topic is 5441 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now