Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Shell Script With Apple Script - Syntax

Featured Replies

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

  • 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"

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.