ジャムスタ

just another mind Style

KeynoteをAppleScriptで操作するための覚え書き その1

tell application "Keynote"
	tell front document
		set newslide to make new slide
	end tell
end tell

これで新しいスライドが作成できる。

スライドの中のタイトルに文字列を設定したい場合は、

tell application "Keynote"
	tell front document
		set newslide to make new slide
		set the object text of the default title item of newslide to "hoge"
	end tell
end tell

とする。この場合hogeがタイトル担当のテキストボックスに入る。