Subject: | |
From: | |
Reply To: | |
Date: | Thu, 27 Apr 2006 14:59:30 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I am trying to insert 48 low-res PDF files into a FM6 document. Using Chuck
Pelto's excellent workaround with FM Scriptmaker, the files sort of get
inserted. The problem is, I get the error message "Cannot import file
"Myfile.pdf". Ran out of memory while translating." The file "Myfile.pdf"
is my temporary place holder file for SM to grab and insert into FM6 db.
Any suggestions? I know we cannot increase a script's memory size in
OSX...or can we? Here is part of my script I think is relevant to this problem:
--------
try
repeat with i from 1 to filecount
if ".pdf" is not in (item i of filelist as string) then
set nothing to ""
else
tell application "Finder"
set myfile to item i of folderPath as string
set myfilename to the name of item i of folderPath
end tell
try
set AppleScript's text item delimiters to "_"
set myfolio to text item 1 of myfilename as integer
if myfolio < 10 then
set myfolio to "0" & myfolio as string
end if
set AppleScript's text item delimiters to ""
on error
set AppleScript's text item delimiters to ""
end try
tell application "Finder"
copyFile myfile to mydesk replacing yes
set mynewfile to mydesk & myfilename as string
renameFile mynewfile to "Myfile.pdf"
end tell
tell application "FileMaker Pro"
activate
try
set mycell to "Page Box " & myfolio as string
tell database mydbfile
do script "Go to Entry Screen"
go to cell (mycell)
do script "Insert PDF"
end tell
on error errmsg
display dialog errmsg
end try
end tell
tell application "Finder"
try
delete file "Myfile.pdf" of desktop
end try
end tell
end if
end repeat
on error errmsg
display dialog errmsg
end try
----------
thanks,
Bob R.
|
|
|