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:
Mark Lively <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 28 Apr 2006 01:18:31 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (83 lines)
Is there a problem with the particular PDF that it is trying to insert?
FM Scripting is until 7 very much like running the interface yourself.

On Apr 27, 2006, at 2:59 PM, Bob R. wrote:

> I am trying to insert 48 low-res PDF files into a FM6 document.   
> Using Ch=
> uck
> 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 p=
> roblem:
>
> --------
> 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.
>

ATOM RSS1 RSS2