--
--
You received this message because you are subscribed to the "MultiAd Creator User Group" group.
To post to this group, send email to multiad...@googlegroups.com
To unsubscribe from this group, send email to
multiadcreato...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/multiadcreator?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "MultiAd Creator User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to multiadcreato...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

START SECTION OF CODE TO REPLACE
with timeout of 3600 seconds
export EPS spread spreadIndex of document 1 saving in (outFold & nam) resolution limiting 600 flatness limiting 3.0 font inclusion all fonts preview options no preview export method composite output color space CMYK scaling by 100.0 bleed amount 0.0 with binary encoding, level 2 PostScript, OPI omit EPS and include Type 1 fonts with custom encoding without bitmap OPI Comments, OPI omit bitmap and making more compatible gradients
end timeout
end if
END SECTION OF CODE TO REPLACE
FULL SCRIPT BELOW
(*
2003/03/19 Written by Steve Mills. Improvements over original “Export Folder of C6 to EPS” scripts:
-Handles long folder/file names in OSX.
-Allows long EPS file names in OSX.
-Logs errors for missing graphics, missing fonts, and overflowed text, and doesn't force user interaction when these occur.
-Handles multiple spreads with panache.
-Output dir can be same as input dir (or any dir inside it) because it doesn't use buggy "list folder" scripting addition.
*)
global c6files
on run
--The open handler takes a list of folders, so make this a list by putting {} around it:
set theFold to {(choose folder with prompt "Choose a folder of Creator documents to export as EPS files.")}
open theFold
end run
on open folds
--Declare local vars so Script Debugger will display them while debugging:
local folds, num, i, outFold, nam, ext, missingGraphics, missingFonts, overflowedText, spreadAction, spreadIndex, numSpreads, osVersion
--Test OS version for file name max len:
tell application "Finder"
set osVersion to version
set sd to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"."}
set osVersion to every text item of osVersion
set AppleScript's text item delimiters to sd
set osVersion to (item 1 of osVersion) as number
end tell
set outFold to (choose folder with prompt "Where should the EPS files be exported to?") as string
--What should be done with documents that have multiple spreads?
set spreadAction to button returned of (display dialog "What should happen if a document has more than one spread?" buttons {"Ask User", "Export First Spread", "Export Last Spread"} default button "Export Last Spread")
set c6files to {}
set missingGraphics to {}
set missingFonts to {}
set overflowedText to {}
set num to number of items of folds
--Gather all the C6 files:
repeat with i from 1 to num
my GatherC6(item i of folds)
end repeat
--Turn goofy Finder file objects into alii:
set num to number of items of c6files
set alii to {}
repeat with i from 1 to num
set alii to alii & ((item i of c6files) as alias)
end repeat
set c6files to alii
--Export all the docs as EPS:
tell application "MultiAd Creator Pro"
activate
set num to number of items of c6files
repeat with i from 1 to num
try
with timeout of 3600 seconds
open {item i of c6files} without interaction
end timeout
on error err number errnum
--Catch and ignore missing graphics, overflowed text, and missing fonts errors, but report all others:
if errnum = 20026 then
set missingGraphics to missingGraphics & ((item i of c6files) as string)
else if errnum = 20700 then
set overflowedText to overflowedText & ((item i of c6files) as string)
else if errnum = 20711 then
set missingFonts to missingFonts & ((item i of c6files) as string)
else
error "The following error occurred while opening document “" & ((item i of c6files) as string) & "”:" & return & err
end if
end try
--Check for multiple spreads:
set numSpreads to number of spreads of document 1
if numSpreads > 1 then
if spreadAction is "Ask User" then
set done to false
repeat while not done
set rep to (display dialog "Enter spread number to export (1 to " & numSpreads & "):" default answer "1" buttons {"Cancel", "Skip", "Export"} default button "Export")
if button returned of rep is "Export" then
set spreadIndex to (text returned of rep) as number
if spreadIndex ≥ 1 and spreadIndex ≤ numSpreads then set done to true
else if button returned of rep is "Skip" then
set spreadIndex to 0
set done to true
end if
end repeat
else if spreadAction is "Export First Spread" then
set spreadIndex to 1
else
set spreadIndex to numSpreads
end if
else
set spreadIndex to 1
end if
if spreadIndex > 0 then --0 means skip it.
--Build name for EPS file by removing ".crtr" (if it exists), adding ".eps", and making sure the name does not excede
--OS9's 31-char limit:
set nam to (name of document 1)
if length of nam > 5 then
set ext to (characters -5 thru -1 of nam) as string
ignoring case
if ext is ".crtr" then
set nam to (characters 1 thru -6 of nam) as string
end if
end ignoring
end if
if osVersion < 10 and length of nam > 27 then
set nam to (characters 1 thru 27 of nam) as string
end if
set nam to nam & ".eps"
--Export it:
with timeout of 3600 seconds
export EPS spread spreadIndex of document 1 saving in (outFold & nam) resolution limiting 600 flatness limiting 3.0 font inclusion all fonts preview options no preview export method composite output color space CMYK scaling by 100.0 bleed amount 0.0 with binary encoding, level 2 PostScript, OPI omit EPS and include Type 1 fonts with custom encoding without bitmap OPI Comments, OPI omit bitmap and making more compatible gradients
end timeout
end if
close document 1 without saving
end repeat
end tell
--Report errors by writing them to a log file in the output folder:
if missingGraphics ≠ {} or missingFonts ≠ {} or overflowedText ≠ {} then
set errF to (outFold & "Error Log")
tell application "Finder"
if exists file errF then
delete file errF
end if
end tell
set rn to (open for access errF with write permission)
write "The following documents reported errors when they were opened:" & return & return to rn
if missingGraphics ≠ {} then
write "Missing Graphics:" & return & "-----------------" & return to rn
my WriteErrList(missingGraphics, rn)
end if
if missingFonts ≠ {} then
write "Missing Fonts:" & return & "--------------" & return to rn
my WriteErrList(missingFonts, rn)
end if
if overflowedText ≠ {} then
write "Overflowed Text:" & return & "----------------" & return to rn
my WriteErrList(overflowedText, rn)
end if
close access rn
end if
activate
beep
display dialog "All Creator documents have been exported to EPS." buttons {"OK"} default button 1 giving up after 60
end open
on GatherC6(fold)
local fold, folds, num, f, inf
tell application "Finder"
set c6files to c6files & (every file of folder fold whose file type is "Crtr")
set folds to (every folder of folder fold)
set num to number of items of folds
repeat with i from 1 to num
my GatherC6((item i of folds) as alias)
end repeat
end tell
end GatherC6
on WriteErrList(errs, errF)
set num to number of items of errs
repeat with i from 1 to num
write (item i of errs) & return to errF
end repeat
write return to errF
end WriteErrList
Totally unrelated but I just wanted to say "Hi" to Steve (didn't know you had moved on, either, but glad you are still on the list!) and everyone, and wish you all a Happy Turkey Day! I'm not on much these days, either. Working only P/T at More Sugar now, and have a full-time design job in the marketing department of an awesome local gym. I still scan the emails from time to time when I'm in the office.
Cheers everyone! Karen
> --
> --
> You received this message because you are subscribed
to the "MultiAd
> Creator User Group" group.
>
To post to this group, send email to multiad...@googlegroups.com
> To unsubscribe from this group, send email to
>
multiadcreato...@googlegroups.com
> For more options,
visit this group at
>
http://groups.google.com/group/multiadcreator?hl=en?hl=en
>
> ---
> You received this message because you are subscribed
to the Google Groups
> "MultiAd Creator User Group"
group.
> To unsubscribe from this group and stop receiving emails
from it, send an
> email to
multiadcreato...@googlegroups.com.
> For more options,
visit https://groups.google.com/d/optout.
>
--
More Sugar Entertainment
www.moresugar.com |
facebook.com/moresugarmag
Tom office: 845-526-2190 | Tom cell:
845-729-2511
Hear, hear! Agreed. And happy new year everyone!
Karen