Capture keynote slide as picture

Hi,

I’m wanting to capture a specific keynote slide as a jpg of size 480x320. Anyone tried to do that before??

Thanks

should be doable, but my Keynote trial expried otherwise I would give it a shot. From looking at the dictionary though it would be something like

tell application "Keynote"
	tell slideshow 1
		show slide 6 -- or whatever slide number
		-- save as (here is where I can't test since this feature is disabled)
	end tell
end tell

I don’t think save will work, James. (I’m surprised Keynote doesn’t have an export command like QuickTime Player.) You might be able to use GUI scripting to export it though. (You’d have to use Image Events [etc.] to resize it, though.)

This GUI scripting seems to work:

set slideNum to "1" -- specific slide number, as text

tell application "Keynote"
	activate
	show slide (slideNum as integer) of slideshow 1
end tell

tell application "System Events"
	tell process "Keynote"
		click menu item "Export." of menu of menu bar item "File" of menu bar 1
		tell sheet 1 of window 1
			(* Export as image *)
			try
				click button "Images" of radio group 1
			end try
			click radio button "From:" of radio group 1
			tell text field 2 to set value to slideNum
			tell text field 3 to set value to slideNum
			click button "Next."
			
			(* Save as *)
			set value of text field 1 to "Slide"
			keystroke "d" using command down -- Sets "Where:" to Desktop
			click button "Export"
		end tell
	end tell
end tell

That works great! thank you very much.