-
-
Save boillodmanuel/1f4b94f0410081338a98935f13c557da to your computer and use it in GitHub Desktop.
global presenterNotes | |
tell application "Keynote" | |
activate | |
open (choose file) | |
tell front document | |
do shell script "rm -f ~/keynote-notes.txt" | |
set num to 0 | |
repeat with aSlide in every slide | |
set num to num + 1 | |
do shell script "echo '-- " & num & " --' >> ~/keynote-notes.txt" | |
set slideNote to presenter notes of aSlide as text | |
do shell script "echo '" & slideNote & "' >> ~/keynote-notes.txt" | |
do shell script "echo '' >> ~/keynote-notes.txt" | |
end repeat | |
end tell | |
quit application "Keynote" | |
end tell |
Hmmm, I was able to successfully run the script on stackexchange and it dumped the notes onto the clipboard. I just copied it into ScriptEditor and hit the "run" triangle button. But the script here gives errors when I try to run it the same way, ScriptEditor result is:
error "Keynote got an error: sh: line 4: Advisory: command not found
sh: line 6: Always: command not found
sh: line 8: Explain: command not found
sh: line 9: Current: command not found
sh: line 11: Apology: command not found
sh: line 12: The: command not found
sh: line 13: We: command not found
sh: line 14: This: command not found
sh: -c: line 15: unexpected EOF while looking for matching `''
sh: -c: line 16: syntax error: unexpected end of file" number 2
Maybe the tbrk comment is the solution - but I don't know how to make the change? Thanks!
Thanks for posting your version of this script. I would just note that the global variable should probably be
slideNote
and also that thepbpaste
in the original script is better because it has no problems with single quotes in the presenter notes.