AnsweredAssumed Answered

Opening a password-protected database from Terminal/Unix or Applescript

Question asked by pm125 on Nov 15, 2018
Latest reply on Nov 15, 2018 by pm125

I would like to execute a FM script on demand by having a remote machine open a served FM database, which will have the desired script as the opening script and will close itself after execution. The workflow I am considering would be:

 

- Client accessing the served database using FM Pro on any other computer presses a button that sends an email to me

- My email client, constantly running on the remote machine, recognizes the email and opens the same FM database to execute the desired script

- To open the FMP database, the email client (Apple Mail) will open an Automator file

 

I am considering this method because Automator can execute a Unix shell script ("open <filename>") or an Applescript script. When this happens, however, FM Pro will ask for login credentials for the database. Is there a way to enter these using the shell script or Applescript? Or is there another way to open a password-protected database in response to an email?

 

The reason for all this, in case you are wondering, is that the remote machine has access to a relatively large (700GB) database of files that are rarely needed and that would be expensive ($3,000/year) to keep always stored on FM server. To avoid storing these files on the server running FM server, the database shows the filenames and container fields that can are empty until the user requests the file. Clients can see the name of these files and select them for uploading to the database. They then press a button to request the uploading. This button will send the above-mentioned email, which will then trigger the remote computer to upload the file by inserting it into the container field.

 

An alternative method, which I am currently using, is to have the FMP client on the remote machine constantly logged into the database, and run a script every 30 seconds checking whether the user has placed a request for a file. It works, but it seems less efficient than responding to user requests when they come in. These requests come in at intervals of minutes-weeks-months, but I would like the user to have access to the file within 5 minutes of their request.

 

The simpler solution (giving users direct network access to the remote machine) is not an option. For privacy reasons, the files need to be viewed within Filemaker.

Outcomes