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.

trouble running same applescript from filemaker that runs fine in Script Editor

Featured Replies

I've seen several posts about similar problems but none seem to resolve my issue. 

i am trying to run an applescript to create a preview of a document using qmanage.

this works perfectly fine when run from script editor but will not work using the run applescript command in filemaker. i've also tried send event command using 'script editor' as the application to use for running the script. neither create the preview png file. but it works fine if i run it in script editor.

this is the script content:

tell application "System Events"
launch
do shell script "chmod 777 " & "\"/Users/user/Documents/filename.docx\""
delay 1
do shell script "qlmanage -t " & "\"/Users/user/Documents/filename.docx\"" & " -o " & "\"/Users/user/Documents/\"" & " -s 1000"
end tell
delay 1


when run through filemaker it returns no errors or anything. it just seems like it's running but doesn't actually create the preview image.


any other ideas on how to run this successfully using filemaker scripting? 

I'm using Filemaker 19.6.3

I don't know the answer to your question.

What I would do in your place is break it down to pieces and see where exactly it breaks down. Start with this AppleScript (entered in the "Native AppleScript" window):

do shell script "qlmanage -t '/Users/user/Documents/filename.docx'"

(this should bring up a window with the thumbnail image). Then add the other options, one by one, until it stops working.

 

  • Author

many thanks for that. i tried several versions. all can establish so far is that it does work when using -p or -t only, it opens the preview in the finder. however as soon as i add the -o command it doesn't work.. still works in script editor though, just not from FMP

ok finally worked this out. if i use the desktop folder for example it works. so there must be some permissions issue with the documents folder. all sorted now. thank you for your help 

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.