kuma_24 Posted January 28, 2004 Posted January 28, 2004 I am trying to open a PDF in Acrobat using a calculated link. Does anyone know how I might approach this problem?
stuj1026 Posted January 28, 2004 Posted January 28, 2004 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
kuma_24 Posted January 29, 2004 Author Posted January 29, 2004 Thanks for the info. Is there a way to browse to a particular file instead of having to type it into the field?
Jeff Spall Posted February 3, 2004 Posted February 3, 2004 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
HazMatt Posted February 23, 2004 Posted February 23, 2004 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.
HazMatt Posted February 23, 2004 Posted February 23, 2004 I should also mention that I have not tested this in Mac OS X. We have yet to migrate our Macs to OS X.
Fenton Posted February 23, 2004 Posted February 23, 2004 > 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.
HazMatt Posted February 23, 2004 Posted February 23, 2004 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).
Recommended Posts
This topic is 7647 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now