teecee Posted February 8 Share Posted February 8 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 Link to comment Share on other sites More sharing options...
comment Posted February 8 Share Posted February 8 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. Link to comment Share on other sites More sharing options...
teecee Posted February 13 Author Share Posted February 13 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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