April 24, 200817 yr In my initial message I described what I wanted to do, batch print multiple records with container fields containing multi-page PDF files. I found an App that works for this called "Skim" which is capable, via AppleScript of prompt-less printing of PDF files. I use filemaker's "Export Field Contents" to put the files in a known location, than using a calculated applescript I feed the PDF paths to Skim. The only problem is Skim won't open them. It displays an error message saying the file couldn't be found. Weird thing is it displays the exact and correct file path so what is it I'm doing wrong? Calculated AppleScript follows: "set filepath to "" & $tempfilepath[$count] & """ & "¶tell application “Skim”¶ activate¶ open filepath¶ print document 1 without print dialog¶ close document 1¶ end tell¶"
April 24, 200817 yr That's not a regular AppleScript Mac file path. And it's just text. AppleScript expects either an "alias", a "file", or a "folder". This would work: open file "Macintosh HD:Applications:FileMaker Pro Advanced:002Army_HealthAndWellness.pdf" Personally I wouldn't be putting a bunch of documents inside the FileMaker Pro application folder. There's several other places you could put them. FileMaker knows a couple of them: Get ( DesktopPath ) Get ( DocumentsPath ) AppleScript knows these, and a bunch more: path to desktop path to documents folder path to application support from user domain path to temporary items The above produce an alias, not text. So if you wanted to add something to the path (which you would), you'd need to coerce to text, add it, then coerce back to a file or folder. Yeah, Unix text paths are simpler to use in some ways. You'd have to do something like this (which only works if the file is there, otherwise it's an error): set doc_txt to path to desktop as text set file_path to alias (doc_txt & "002Army_HealthAndWellness.pdf") Notice that most of these by default refer to the user domain (within user's home folder). But there is also a "Application Support" folder in the top Library folder, which is the default path. [FileMaker 9 has a Get (TemporaryPath), but it's not the same place, nor does it behave the same.] Edited April 24, 200817 yr by Guest
Create an account or sign in to comment