2 Replies Latest reply on Jul 22, 2015 9:22 PM by strngr12

    Runtime Applescript -> CURL call doesn't work.

    strngr12

      I have a script that tells Filemaker to tell Applescript to run an https curl call.  It works when I run it in 14, but not if I create a runtime from it.  It always worked in runtimes created in 13 (and 12 and 11).  Does anyone have any insight into why a runtime would not be able to complete a curl call through Applescript when made in 14?

        • 1. Re: Runtime Applescript -> CURL call doesn't work.
          steve_ssh

          Hello,

           

          Are you able to trap for errors in your AppleScript code, and pass the error message back to FileMaker?

           

          I think doing so would be a great start towards trouble shooting.

           

           

          On a related topic:

           

          Because the runtime build will have a different application name and ID than FileMaker does, any AppleScript that you are using to pass a value back into the solution file will need to be adjusted accordingly.

           

          Example:

           

          Though something like this would work fine in FileMaker, it would not work in your runtime build:

           

          set varResult to ( do shell script "...." )

           

          tell app "FileMaker Pro"


          set cell "MyField" of current record to varResult

           

          end tell

           

           

          Instead, the tell app line would have to change to reference either the app name or ID of your runtime build:

           

          set varResult to ( do shell script "...." )

           

          tell app "My Runtime Solution"

           

          set cell "MyField" of current record to varResult

           

          end tell

           

           

           

          HTH,

           

          -steve

          • 2. Re: Runtime Applescript -> CURL call doesn't work.
            strngr12

            Thanks, Steve, but I should have been more clear.  The Applescript is generated in the Filemaker script and is just a simple one-liner curl call.  I use it because Filemaker didn't allow for http calls before 13 and, even now, won't allow for custom headers in the https calls.

             

            It's not a disagreement between apps.  I've used this same code in Filemaker to make these curl calls for at least a couple of hundred different clients since 2011 and no problems until the Filemaker 14 upgrade and, in fact, my fix today was to go back to 13 to make the runtime and it worked, no problem.