5 Replies Latest reply on Jun 5, 2016 7:17 AM by user26592

    Send Mail


      I am trying to send info from a field from a Runtime in Kiosk mode using this script:


      Commit Records/Requests

      Set Variable [ $Path; Value:Get ( TemporaryPath ) & "License_request" ]

      Export Field Contents [ License::Field; “$Path” ]

      Send Mail [ Send via E-mail Client; To: "email@address"; Subject: "License_request"; Attachment: “$Path” ] [ No dialog ]

      Perform AppleScript [ Native AppleScript: tell application "Finder" display dialog "

      XXX message." end tell ]



      It works fine for OSX. For Windows I think there are 2 problems:

      1. I don't think the field info is actually getting sent to Outlook for some reason [I get "Unkown Error: -1"]


      2. Obviously the Applescript part doesn't work. Does anyone know the equivalent 'cmd.exe' command to achieve a dialogue after the FM Runtime has quit? BTW I realise I could show a dialogue within FM, but I was intending to put a 'Quit' step in before this to reduce the chances of users messing with an un-licensed solution.

        • 1. Re: Send Mail

          Why do you need the Applescript at all, when the Send Mail script step allows you to perform it with or without dialog?

          Screen Shot 2016-06-04 at 5.52.00 PM.png

          I notice you have got perform without dialog checked. Uncheck it, disable the Perform AppleScript line, and see how it goes.

          • 2. Re: Send Mail

            I do indeed use 'no dialogue' because if there's a dialogue, from memory, you've access the OS and come out of Kiosk mode at which point the Runtime is less secure. Unfortunately I do still need a dialogue to tell the user to pay the license and this needs to happen either in Kiosk or after I exit the Runtime.

            • 3. Re: Send Mail

              Would it be practical to create a layout that displays the message, rather than using the system dialog?


              Also, to clarify, I assume Show Custom Dialog does not sufficiently address your need? I've never tried it in a Kiosk, so I assume you've tried and it brought it out.

              • 4. Re: Send Mail

                Actually 'Show Custom Dialogue' can work, but I had to place it at the beginning of the script. The security problem for pdf's is that once you 'email', the Runtime is still in action but the user has access to the OS and can start copy/pasting/exporting. I've added a 2nd email back the user repeating the dialogue info so that they still have access to it.


                However, if there's someone out there who knows a good manual to 'cmd.exe' and specifically how to place a cursor in a pdf pw dialogue box, that is within an FM container..........I'd love to hear about it!!

                • 5. Re: Send Mail

                  Maybe you can use Send Event and vbscript. See the example of a message box in vbscript at http://stackoverflow.com/a/774197