Create keynote presentation with Applescript

Hello to evrybody,

I try to mace some exersises for my students with Keynote. It is takes rathe much time, so i would like some automatisation. I am not professional programmer.

So i have some questions:

  1. How i could create new slide in keynote presentaion from the applescript.
    i try this one
tell application "Keynote"
   activate 
   make new slide
end tell

but it return eror: cannot create slide
i try enother way:

tell application "Keynote"
   activate 
   duplicate slide 1
end tell

error: cannot duplicate object

  1. how i could add in slide some Shapes and add text to them?
  2. How i could add link to Shape to another slide?

Thank you
Andrey

P.S. Sorry my English


tell application "Keynote"
	tell slideshow 1
		make new slide
		set body of last slide to "BodyText Of Last Slide"
	end tell
end tell

this creates a new slide and sets the body text… that seems to be everything you can create with apple-script commands. For Forms, other text-fields the is no script command available.
Hm, depends on what you wanna do, but GUI-Scripting seems to be the last way out :-/

tell application "Keynote"
	tell slideshow 1
		--		make new slide
		--		set body of last slide to "BodyText Of Last Slide"
	end tell
	activate
	tell application "System Events"
		tell process "Keynote"
			click menu button 1 of group 5 of tool bar 1 of window 1
			delay 1
			key code 125
			
			key code 125
			keystroke return
		end tell
		
	end tell
end tell

Happy Scripting:P

You might also want to check out Self-Prezo by Sal.