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

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

Recommended Posts

Posted

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

Posted
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.

 

  • Like 1
Posted

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.

This topic is 1804 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.