Applescript to add an audio file to keynote and upload the file to youtube

為{幸葍}努か 提交于 2019-12-07 07:49:23

问题


I am trying to use either automator or applescript to do two things.

  1. add an mp3 to an open keynote presentation (to the entire presentation and not a single slide)
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!