MACSCRPT Archives

April 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Bob R." <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sat, 15 Apr 2006 12:31:05 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
Gary,

Here is part of my script that I thought would solve the problem, from my
post last month:

 ------------
tell app "finder"
  set myphoto to choose file  --the PDF file to import
  set myphoto to myphoto as string  --must be done.
end tell

tell app "filemaker pro"
  activate
  tell database "mydatabase.fp5"  --database file name; open in this example
    set cell "Page Box 1" to file (myphoto)  --Page box 1 is a local name
  end tell
end tell
 -------------

Obviously, my final script would have automation; this example was just to
choose one PDF file to test if it would work.  When I later automated it to
insert an entire folder of low-res PDF files into a master FM6 document, it
did insert the files into the document.  HOWEVER...it did not retain the PDF
files in the FM document when I saved a copy of it; using an AS string to
insert the PDF file only puts in a link to the actual file, so the file
folder has to be always present.  I needed a self-contained FM file with
PDFs embedded to send to other people.

Manually inserting the PDF files into the document works.  But this cannot
be applescripted using a file name variable.  The actual file name has to be
in the insert picture Scriptmaker script.  Chuck has found a solution to
this problem that FM simply does not have in its AS library.   Bob R.

ATOM RSS1 RSS2