using variable text string to SaveAs new reecord in Abobe Acrobat 8 Pr

Hi :expressionless:

Newbie to Applescript.

Have created a database in Filemaker Pro v9 (MAC OS X)

  1. User creates a record of a scan file name eg. passport_10-03-08.pdf .
    Filemaker is scripted to save as a text string variable SCANDOCNAME ready to pass to Acrobat.

  2. The user then executes a scan in the hardware application

  3. The scanner software then automatically opens the scan as an Acrobat file untitled

This is where Applescript is needed to save the file name as the original Filemaker variable
SCANDOCNAME eg. passport_10-03-08.pdf

Any one out there with any ideas please? Any help most appreciated.
Thanks

Andreasfm :slight_smile:

Model: iMac
AppleScript: shipped with iMac
Browser: Firefox 2.0.0.12
Operating System: Mac OS X (10.5)

so, are you saying that you already have an applescript variable called SCANDOCNAME that contains the name that you want to save the .pdf as? so in this case, it would be “passport_10-03-08.pdf”?

If so, you just have to do something like this…

set x to path to desktop as string
set SCANDOCNAME to "passport_10-03-08.pdf"
tell application "Adobe Acrobat Professional"
	set DocRef to document 1
	save DocRef to file (x & SCANDOCNAME as string)
end tell

Hi Shai1 Thanks for your help.

No do not have applescript variable called SCANDOCNAME

Filemaker is scripted to save as a text string variable SCANDOCNAME ready to pass to Acrobat.
When the user hits a button [ scan ] this activates a Filemaker Pro Script that creates the file name
SCANDOCNAME and the Filemaker script then finally will activate an Apple Script.

Need to pass this variable to Acrobat via Apple Script.

Any ideas would be welcome

Regards AndreasDNA :wink: