Re: Reality Checked - Exists? = True
Re: Reality Checked - Exists? = True
- Subject: Re: Reality Checked - Exists? = True
- From: Bryan <email@hidden>
- Date: Mon, 10 Sep 2001 20:20:24 -0400
- Organization: Apex Radiology
Have you tried using GhostScript?
ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/gs550/mac/
If you are already outputting PS then just run the script that
comes with MacGS called ps2pdf.
I created a droplet for this purpose,
(please check your output for accuracy.)
on open fileDropList
set theCount to count of fileDropList
set filesProcessed to 0
tell application "MacGS FAT" to activate
repeat with i from 1 to theCount
set theFile to item i of fileDropList as alias
set theInfo to info for theFile
set thetype to file type of theInfo
set theFileName to item i of fileDropList as string
if thetype = "TEXT" or thetype = "EPSF" then
ProcessFiles(theFileName)
set filesProcessed to filesProcessed + 1
end if
end repeat
if filesProcessed > 0 then
if filesProcessed is equal to 1 then
set resultString to "One file was processed."
else
set resultString to {theCount, " files were processed."} as string
end if
else
set resultString to {"No files were processed."} as string
end if
display dialog resultString buttons "OK" with icon 1 default button 1
end open
on ProcessFiles(theFile)
set thePDFfile to {theFile, ".pdf"} as string
set theCommandLine to {"-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=\"", thePDFfile, "\" -c save pop -f \"", theFile, "\""} as string
tell application "MacGS FAT"
gs theCommandLine
end tell
end ProcessFiles
on run
set theFile to (choose file of type {"TEXT", "EPSF"}) as string
ProcessFiles(theFile)
end run
email@hidden wrote:
>
First off, I want to thank everyone for the "warm fuzzies". That, and the
>
weekend gave me a new perspective. Next, I'll answer questions:
>
>
Bryan: All my files are PageMaker 6.52 (Extension p65). My script is
>
printing them to .ps files (Ext .ps). From there I wish to distill to
>
Acrobat PDF (Ext .pdf).
>
>
Christopher: I'm using the standard Script Editor (Version 1.6)
>
>
Hans: I have maybe two weeks before I'd have to abandon this idea and
>
start working on it manually. Actually, that may be pushing it.
>
>
Nigel: The final PDF's need to contain the following Metadata: Title -
>
Same as the Filename
>
Subject - Used in Document Header varies widely Author - Jerry me (Not at
>
all critical)
>
Keywords - Lists the Document "Form Number(s)" (Our Retrieval Number)
>
>
Finally, my script as it stands now:
>
>
tell application "Finder"
>
set filelist to files of folder "FilesToConvert"
>
end tell
>
repeat with aFile in filelist
>
tell application "Adobe PageMaker 6.5"
>
open aFile
>
with timeout of 3*60 seconds
>
set newfilename to name of aFile
>
if newfilename ends with ".p65" then
>
set newfilename to ("" & ".ps") as text
>
else
>
if (count of newfilename) > 28 then set newfilename to (items 1
>
thru -5 of name of aFile) as text
>
end if
>
tell application "PmScript" to run script "PrintToPSFile"
>
close without saving
>
end timeout
>
end tell
>
end repeat
>
>
My PageMaker Script "PrintToPSFile" again:
>
Print 1, 0, -2, """.ps"
>
>
It seems to get there, but always highlites - run script "PrintToPSFile"
>
and displays this message - PmScript got an error: AppleEvent timed out
>
>
I've run the PageMaker Script by itself within the App and it runs fine
>
and produces the proper file with no problem. The above script was written
>
using 4 or 5 peoples posted snipnets. I know I'm getting close. Any other
>
suggestions/modifications?
>
Jerry me
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
[demime 0.98b removed an attachment of type text/x-vcard which had a name of bryan.vcf]