Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5094 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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"

Posted

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.

This topic is 5094 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.