December 16, 20196 yr 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
December 16, 20196 yr 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.
December 16, 20196 yr 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