问题
I am trying to use either automator or applescript to do two things.
- add an mp3 to an open keynote presentation (to the entire presentation and not a single slide)
- upload the resulting keynote presentation to youtube.
If I use the add file command, as below it doesn't seem to work, although if i replace slideshow with slide 1, then it adds it to slide 1 only.
Thanks very much.
tell application "Keynote"
tell slideshow 1
add file slideshow 1 path theFile
end tell
end tell
回答1:
You basically want to add a soundtrack to the slideshow, not add a file. Unfortunately I do not see a way to do this with applescript. Normally you do this by hand in the Inspector->Documents->Audio section. I also do not see an applescript command for the Share->Send To->YouTube command either.
It seems you can't do either of the things you want by applescripting keynote. Keynote doesn't have those applescript commands. It doesn't have any keyboard shortcuts for those things either, so it can't be accomplished with GUI scripting. Sorry.
来源:https://stackoverflow.com/questions/13329051/applescript-to-add-an-audio-file-to-keynote-and-upload-the-file-to-youtube