Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Opening a pdf file with "send apple event"

Featured Replies

I'm trying to open up a pdf file with "send apple event," and though Acrobat Reader will open, the particular file specified in the path does not open. I can open up a Word file with "send apple event," and even a jpg, but not a pdf. Any suggestions?

Maybe the file doesn't have the appropiate creator type or three letter extension. You can use AS to directly open the file in Acrobat.

  • Author

The file does have the right extension and creator type. I need to script it so that the particular file that gets linked (in the field "file path") gets opened.

  • 4 weeks later...
  • Author

Never found a solution to the previous query -- but here's another puzzler.

I'm using "send apple event" to open Microsoft Word files (path is specified in a field). Most of the users don't have a problem. BUT I have a couple of users (on FMP 5.5) who get a weird error message if Word isn't already opens (it works fine if Word is already open). It's not a problem specific to 5.5, since some of my 5.5 users don't have a problem. When I look at the script on the problem computers, the target application is missing (but not on the other users' computers). When I specify the target application, it doesn't do anything (I'm assuming it's because it's a server version). What's going wrong? All the users are on OS X, not sure about the version of Word.

There's a bonus for anybody who can also tell me whether and how you can use Microsoft Word's mail merge function with a hosted file...

  • 2 weeks later...
  • Newbies

Instead of using the send apple event script step you should use the following applescript:

try

copy cell "gLaunchFilePath" of current record to filePath

tell application "Finder" to open filePath

on error errmsg

activate me

display dialog errmsg

end try

Make sure that the "gLaunchFilePath" is the field with the full file path (including file name & extension). This should open the file with the default program for that extension type.

I use this all the time in my solution, hope this helps!

  • Author

You're brilliant! It works perfectly!!!

Thank you!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.