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.

Automatize script in macOS Terminal

Featured Replies

I have a couple of scripts that do things in macOS Terminal via an AppleScript. It may look like this:

Perform AppleScript [ Native AppleScript: tell application "Terminal"
do shell script "cd /Users/admin/Desktop/Exportdata; curl -T Script1.txt -u filemaker:pass123 ftp://ftp.apple.com/" 
end tell ]

Problem: I don't get any information if this work or not.

Is there any way to see the command actual taking place? I added an "Activate" after the "tell" line, but that didn't help. 

As it is now, I do the scripts manually, just to maintain the control of what's happening, but that seems awfully old and not so effective. I would like to automatize this, but still be able to open the terminal window and see that the scripts has been run.

Does anybody know any way of doing this?

Tia,

Andreas

3 hours ago, carlsson said:

Is there any way to see the command actual taking place? I added an "Activate" after the "tell" line, but that didn't help. 

Try doing:

do script "Your script"

instead of:

do shell script "Your script"

 

Although I believe the preferable method would be to do (directly in Filemaker, not through the Terminal):

set myResult to do shell script "Your script" 

 then do something with the result - e.g. set a field to it or show it in a dialog.

 

  • Author

Thanks!

I realized I had "Error Capture On", which mean I din't see any errors on execution.... *dough*

Filemaker actually got an error code passed from AppleScript.

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.