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.

How to run .command file on Mac with passing parameter

Featured Replies

I'm really struggling how to run .command file with passing parameter.

My FM version is FileMaker 18 and MacOS(Mojave).

 

What I have tried is running Perform AppleScript, in its calculation part I coded this

"do shell script \"/Users/admin/Desktop/OrderBook.command PARAMETER\""

 

If I run this script, it keeps saying this error message

/Users/admin/Desktop/OrderBook.command: line 1: OrderBook.csv: Permission denied

 

Is there anyway to solve this?

 

For your information, in my situation, I wanted to run command directly within PerformAppleScript but I gave up because it was really hard to solve syntax error with that.

Thanks in advance

Edited by megalomania

I have never used a .command file, so I don't know the answer to your question. I would suggest you try to run your AppleScript from the Script Editor application. If you get the same error, then the problem is not Filemaker-related.

 

5 hours ago, megalomania said:

I wanted to run command directly within PerformAppleScript but I gave up because it was really hard to solve syntax error with that.

IMHO, that is something worth pursuing. See if this can help:

 

You can get a free trial to Script Debugger here: https://latenightsw.com/sd7/download/

I have the beta 8 version which, I believe, won't be unusable until the official version 8 is released. I have found it stable. (Can't locate the link).

Script Debugger really does demystify Applescript. For one, it shows you the path of the 'do shell script'. It also shows errors reported from the shell. I run python from AS and it also gave me the python generated error messages.

 

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.