I have been having a nightmare trying to open a remotely hosted pdf on a mac...It works perfectly on the PC using the following script
1 Set Variable [$server;
2 Set Variable [$file;
3 Set Variable [$path; Value: $server & $file]
4 Open URL [No dialog; $path]
but the mac always tries to open it in Safari...I have previously asked this question and tried all of the possible suggestions I received to no avail, but I saw the following old post that seems it might be a possible workaround, but I am not sure how to integrate what they are saying into my script, can anyone write out what the script should now look like in Filemaker 14 with this "Get(SystemPlatform)" step in it so that the script will do one thing for a mac and another for the PC?
With much help from TSGal and Orlando offline, and a little bit of luck with a wrong button click, it started working for me. My apologies for never getting around to posting what worked for me here.
For PC's, the "Open URL" method works quite nicely...but not for Mac's. You end up opening the default web browser and searching online...what a pain.
What worked on the Mac's was "Send Event", but even that had serious issues trying to open the file with Adobe Reader or Adobe Acrobat.
At the end of the day, I accidentally clicked "Reader" instead of "Adobe" in the Send Event options window and it worked nicely. My script now uses a Get(SystemPlatform) step, and uses "Open URL" for PC's and "Send Event" for Macs.
When using the Send Event:
1. Set a variable "$path" to the target file location or field containing the pathname
Set Variable [$path;Value:Table1::Target_File_Path]
2. Send Event ["aevt";"odoc";"$path"]
I hope this works for you as well...please let us know.
Edit: Not familiar with the Mac's, I called it "Reader"...when the window opens showing the pdf file, the window is running "Preview". In the Send Event settings, choose to 'Send the "Open document/application" message', "File" radio button and type "$path" in the specify file window. The "File Type" setting on the top line of the Send Event dialog shows "<unknown>".