By the way: the issue is only with .pdf files. I have complete Web pages saved with the file:/// protocol, and they open as expected.
Thank you for your posts.
I am unable to replicate the issue. This is what I have done:
1. On a Windows 8.1 machine, I placed a PDF file on the Desktop.
2. I launched Internet Explorer and dragged the PDF file into Internet Explorer to get the web address.
3. I copied the web address (C:\Users\TSGal\Desktop\123.pdf) to the clipboard.
4. I launched FileMaker Pro 13.0v4, created a database file with one Text field (Name) and one record (TSGal).
5. I created a script that executed the script step "Open URL". I pasted the URL into the formula, changed the backslashes to forward slashes, and preceded the entire string with "file:///", so it reads "file:///C:/Users/TSGal/Desktop/123.pdf".
6. I saved the script, and then executed the script. The PDF is displayed fine.
Let me know what I'm doing differently than you so I can replicate the issue.
it needs to be URL encoded, its a url after all
so 'space' is replaced by %20, use FileMakers getasurlencoded on the last pat of the path
My database includes a field for URLs, and most records include URLs.
In browse mode I have a layout that includes a "headline" , some other sorting data fields, and the URL.
From that list, I click on a button which executes a simple script using the Open URL script command.
As indicated, http: protocol links work, as do links to file:/// protocol URLs that lead to saved Web Pages.
rwu2359: I'll look into that coding today.
@ rwu2359: GetasURLEncoded turns a space into the hexadecimal expression "%20". The URLs in question all already use the %20 and none include spaces.
From FMPro 13 help: This function removes all styles from text. All characters are first converted to UTF-8 format. Characters that are neither letters nor digits, or digits that are in the upper ASCII range, are converted to %HH format (a percent sign followed by the character’s hexadecimal value).
I added the GetasURLEncoded command to my OpenURL script just to be sure, and it behaved even worse (for http:// protocol URLs it opened chrome and went to my home page; for file:/// protocol URLs it does nothing)
And I want to repeat, this used to work for pdf files.
I can take the existing URL (with %20 and not spaces) and paste it into a browser and it works just fine. FMPro won't do that for .pdfs in my current scripting.
The script itself is very simple: (just one step)
Open URL [no dialog ; link ]