I had the following script working fine until upgrading to Mavericks, to semi-automating saving Keynote presentations as PDFs with specific settings:
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
click ((pop up buttons of sheet 1 of window 1) whose description is "Presets")
click menu item "6x" of menu of ((pop up buttons of sheet 1 of window 1) whose description is "Presets") --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
end open
This worked fine. Now, when I run it, I get the message
System Events got an error: every pop up button of sheet 1 of window 1 of application process “Keynote” whose description = “Presets” doesn’t understand the “click” message.
on the line
click ((pop up buttons of sheet 1 of window 1) whose description is "Presets")
I’ve found a couple of other posts that make me think that click has stopped working for some UI elements in Mavericks. It clearly still works for some items, & accessibility prefs. are ok, b/c the prior click menu item command runs fine.
Any help would be much appreciated!