Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6036 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Just looking for some basic pointers on this; I have a script that builds a complete email ie: it populates, the address, subject and message body. I am now being asked if I can make the body into a PDF file. I have managed to trigger an empty email with the PDF sitting in the body, but thus far, I cant manage to populate the address and subject lines of the email. Any ideas how this can be achieved?

Posted

I have a script that first saves the found set as a pdf into the systems temp folder, then I use the send mail and attach the PDF just created. For security purposes I overwrite the PDF after sending the email.

Posted

That sounds good - create a PDF, then attach it to an email. What I am not sure about is the location of the PDF. I dont know what the Systems Temp Folder is but different machines will have different drive names. Is it possible to script a file location that will be universal for all my (Mac OSX) clients?

Posted

In FM9 there is a new function Get (TemporaryPath) that resolves to the OS temporary folder.

Since the profiles are often not updated, perhaps you have FM9?

Posted

Correct - I am using v9 but forgot to update my profile.

To my embarrassment all my FM books are on v7,8 and 8.5 so I had not heard of this script step. Time to go shopping for new books!

Thanks for your help.

Posted (edited)

I don't know what FileMaker 9 books say about this new function. But there is some discussion (on TechNet) about what exactly that folder does with files. If you open it and watch you will see that FileMaker creates and deletes (when it quits) FileMaker application temporary files within that folder. But I don't know when, if ever, other files are deleted (if you know, please tell us). FileMaker doesn't delete them when it quits. The OS does not delete them when you restart. I have a file I put in there (manually) 4/10/2008. It's still there.

So it is not really the OS temporary folder, of which there's more than one. Each user has one (I'm going to use AppleScript path syntax, but you can convert to FileMaker easily), If you're the only user it will be:

"Macintosh HD:private:var:tmp:folders.501:TemporaryItems:"


But if multiple users yours may be 502, etc..



AppleScript can easily get that path, with:



path to temporary items



Which you can set to a global field, using the Perform AppleScript step.



Anything in that folder will be deleted upon restart. So, if you're exporting a lot of large PDFs, I'd investigate.



To see FileMaker's temp folder, run this AppleScript.





set p to alias "Macintosh HD:private:var:tmp:folders:501:TemporaryItems:FileMaker:"

tell application "Finder"

	open p

	activate

end tell

Notice the subtle difference. FileMaker's path has: folders:501

You user temp folder has: folders.501

[P.S. There is also a Get ( SystemDrive ) function in FileMaker (came out in 8), which can get the hard drive name, if you want to try and calculate the path directly. But there's still the 501, 502 problem. Though most people are going to be 501.]

Edited by Guest

This topic is 6036 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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