| | | |
AppleScript: Examples (page 2) |
|
|
Here is an example script to export each page of a Create document as a JPG image. |
|
|
set basedir to "~/Documents/Create/slides-"
set theDate to current date
set destination to basedir & year of theDate & ¬
"-" & month of theDate & "-" & day of theDate & "+" & time of theDate ¬
& "/"
tell application "Create"
tell the front document
set thepages to pages
set totalpages to pagecount
repeat with i from 1 to totalpages
if i < 10 then set filename to destination & "Slide_0" & i & ".jpg"
if i > 9 then set filename to destination & "Slide_" & i & ".jpg"
set currentpage to i
tell page i
export in filename
end tell
end repeat
end tell
end tell
|
|
|
To export each page as a PDF file, substitute “.pdf” for “.jpg” in the filename. To export each page as an EPS file, substitute “.eps” for “.jpg” in the filename. |