Print filemaker to PDF automaticly

I’ve got a filemaker database and have Mac OS X.

Now i usually print out quotations. I press print in filemaker and then choose “Save as PDF…”. I then enter in the quotation no.

I have a script which takes the q.nr. so that i only have to select “Save as PDF…” and then paste the q.nr.
this is the script:

tell application "FileMaker Pro"
	
	set the offertenummer to cell "Offerte.nr" of current record
	set taal to cell "Taalkeuze" of current record
	
	if taal = "Frans" then
		set the offertenummer to "Dévis no. " & offertenummer
	end if
	if taal = "Engels" then
		set the offertenummer to "Quotation no. " & offertenummer
	end if
	if taal = "Duits" then
		set the offertenummer to "Angebot nr. " & offertenummer
	end if
	if taal = "Nederlands" then
		set the offertenummer to "Offertenr. " & offertenummer
	end if
	
	set the clipboard to offertenummer
	
	do script "print record"
end tell

tell application "Finder"
	
end tell

Is it possible to automaticly select “Save as PDF…” (I’ve got the dutch version, which says “Bewaar als PDF…”) and then paste the text into the field where the name of the PDF comes?

I have no handy way to try it, but I thought FileMaker Pro 8 had the ability via it’s own scripting language to output PDFs. Wouldn’t that work for you?

Or, if you’re just trying to get AppleScript to do it from outside, maybe make the FileMaker script, then evoke THAT script from AppleScript?

Not 100% sure I understand the question, and my allergies have me foggy-brained, so sorry if I missed the point…

There is a script step save records as PDF
you could use that

if you are using FMP 7 or 8 not sure but 8.5 does