View Full Version : Preps Applescript

02-12-2007, 02:05 PM
Anyone using Applescript for Preps template creation? The only way I could get my Applescript to create a new template was to use the "System Events".
I tried using Preps Applescript library to create a new template but never had success. Is anyone aware of any additional Kodak resources for Preps Applescript that may be of some value as I try to automate template creation?

02-17-2007, 08:41 PM
Only use the interleaf blank pages for a job in the run list when creating JDF files. Faster for multiple sig job.
Using scripts would be nice for creating templates though.


04-25-2007, 05:50 PM
Without knowing the detail of what you are trying to do, couldn't you create a "Blank" template in Preps and save it somewhere. Then use AppleScript to copy/rename/open the template as a Finder operation?

Just a thought.


04-26-2007, 11:02 AM
Here is a script I received from someone at creo. I was doing a ps job and just adding blank pages into prinergy connect. I now have a new job with evo and we are doing PDF jobs and pjtf out of preps. I didn't get time to mess with this in preps but you can script prep. Here is what was sent to me.

tell application "Finder"
set thetemplate to (choose file with prompt "Pick the template you want to use for the job") as text
set outputdevice to (choose folder with prompt "Pick the printer you want to use for the job") as text
set outpath to (choose folder with prompt "Choose the folder for PJTF Output")
display dialog
"Name for the job?" default answer "New Job"
set jobname to (text returned of result)
display dialog
"How many blank pages do you need?" default answer "2"
set myblankpages to (text returned of result)

end tell
tell application "Preps 5"
say "Starting Script"
-- remove later
if exists front job then
close front job
end if
if not (exists (front job)) then
display dialog "This script will only work if there" & return &
"is no job currently open in Preps :-)" buttons {"OK"} default button 1 with icon 1
do shell script "sleep 5"

end if
--make new mixed files job
make new job with properties {workflow:mixed, name:jobname}
--insert files from the selected folder

make new blank page with properties {pagecount:myblankpages} in runlist of front job
--autoselect the signature from the template chosen
autoselect signatures for the front job using thetemplate
--print the job to PS file to the selected folder
print the front job saving as job ticket saving in outpath to device outputdevice

end tell

Hope it helps.

04-28-2007, 01:30 AM
Interesting. I tried this script and I'm not getting the correct pages. Am I thinking it through correctly? Isn't the default pages referring to the blank pages that would normally be shift-clicked below the line? Everything else seems to be working the way it should. What if you wanted to make a ppf instead? Depends on the what you leave default in the application? Hmm...

04-28-2007, 01:33 AM
nm, in terms of the ppf creation. found the answer in another thread. anyone still no anything about the blank pages?

04-28-2007, 08:54 PM
This script is only set up to do blank pages because at that time that is what we were doing for preps. I worked at a web house that did only 2up SW we dropped blank pages in our preps job and we could use that imposition for multiple lots later in prinergy connect. The reason I posted it was that people in the begging of this thread where thinking that preps is not scriptable. You should be able to change the script to add pdf's and print a PPF pjtf pdf ps or whatever.

04-30-2007, 09:13 PM
Actually, let me clarify. I believe we are using a workflow similar enough to need the same thing. We produce impositions with blank pages and use them multiple times with different pdf's in Prinergy, so I am interested in the blank pages aspect of this script.

What I meant to say was that, no matter what number I put for the blank pages, I always end with the same number of blank pages - 1. Even the default number of 2 doesn't take effect as far as I've seen.

I am still only on 5.1.5, if that matters.