-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathKeynote 5.3 to PDF.applescript
34 lines (25 loc) · 1.23 KB
/
Keynote 5.3 to PDF.applescript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- Keynote 5 / iWork '09
tell application "System Events"
tell application process "Keynote"
set frontmost to true
repeat until window 1 exists
end repeat
-- Hide Inspector if visible
if menu item "Hide Inspector" of menu 1 of menu bar item "View" of menu bar 1 exists then
keystroke "i" using {command down, option down}
end if
-- Print; wait until the sheet is visible
click menu item "Print…" of menu 1 of menu bar item "File" of menu bar 1
repeat until sheet 1 of window 1 exists
end repeat
set thePopUp to first pop up button of sheet 1 of window 1 whose description is "Presets"
click thePopUp
click menu item "6x" of menu 1 of thePopUp --replace if desired with your preferred preset
if value of (checkbox 1 of sheet 1 of window 1) is 0 then
click (checkbox 1 of sheet 1 of window 1)
end if --set to print selected slides only -- you can use the same technique to adjust other checkboxes as desired
click radio button "Individual Slides" of radio group 1 of sheet 1 of window 1 --replace to suit your needs
click menu button "PDF" of sheet 1 of window 1
click menu item "Save as PDF…" of menu 1 of menu button "PDF" of sheet 1 of window 1 -- Save as PDF...
end tell
end tell