January 28, 200421 yr I am trying to open a PDF in Acrobat using a calculated link. Does anyone know how I might approach this problem?
January 28, 200421 yr You will need thescript step "Open Url" Then use a field such as locationPDF=text field locationPDF field will equal the path to your pdf file weather that be locally such as c:pdf_fileexample.pdf or http://www.mysite.com/example.pdf so you would "open url(locationPDF)" open without dialog Stu
January 29, 200421 yr Author Thanks for the info. Is there a way to browse to a particular file instead of having to type it into the field?
February 3, 200421 yr Hi, the Troi file plugin will search for a filename and return the directory path. On the Mac classic or OSX platform I'd use a script to find the file with the Troi plug-in and then send an Applescript/shell script command to open it in the application. regards, jeff
February 23, 200421 yr Thanks to suggestions from this forum before, I was able to create exactly what you're looking for without plugin help. You basically need a predictable file path (either on your local computer or a network). Then, create two calculation fields; one for Macs (using AppleScript) and one for PCs. You can then have your script detect if the user is on Windows or Mac using the Status(CurrentPlatform) function, then use the Perform AppleScript (Mac) or OpenURL (PC) on the resulting calculation field. Take a look at the screenshot of the fields in my database. The part number of the current record is "025-6000-0014-00". You can see how my folder structure is laid out on the "NetDrive" network volume. I can post the calculations for the fields if you like.
February 23, 200421 yr I should also mention that I have not tested this in Mac OS X. We have yet to migrate our Macs to OS X.
February 23, 200421 yr > Is there a way to browse to a particular file instead of having to type it into the field? In AppleScript, just say "choose file" That gets you the standard file navigation window. When you pick a file it returns the "alias", which is about the same as "file", but a little more flexible. To convert the result to text, just say "as text" or "as string" Ex. tell application "FileMaker Pro" set cell "Filepath" to (choose file) as text end tell "tell" block is not needed within Perform AppleScript (unless you're nested inside another apps tell block), only in Script Editor. FileMaker knows to tell itself. So all you'd need is: set cell "Filepath" to (choose file) as text In Troi, you'd use (look at his example files): External("TrFile-Get FileSpec Dialog", "Choose a file:") MDLarson, a straight Finder call will work the same in OS X. Not that much has changed.
February 23, 200421 yr Thanks for the tip, Fenton. I revised my AppleScript calculation to account for common errors on the Mac OS (not having the "Engineering" volume mounted and the absence of the requested PDF). Here's a screenshot of the calculation that actually works with AppleScript (note the multiple quotation marks where needed).
Create an account or sign in to comment