0

I am trying to write a script to automate export from keynote:

tell application "Keynote"

export document 1 to file "Macintosh HD:Users:shambho:test.m4v" 

end tell

This script works fine, but the output generated is of very low resolution. I want to specify export format so that the video is of higher resolution.

I have tried many combination of the with properties export options movie export format command, but not able to even save the script.

Any help to get this from script will be greatly appreciated.

When exporting manually, this is what I do:

  1. Goto the menu: File>Export to>QuickTime
  2. Choose option: Format>Custom
  3. Change 1024 to 700
  4. Hit Next and then save.

If this is not possible, at least the default 720p format is what I need for reasonable resolution.

Using OS X El Capitan Version 10.11.6

Shambho
  • 3,250
  • 1
  • 24
  • 37
  • 1
    Once your in the applescript editor you can open a third party's applescript function library showing you the commands that are supported. I'm not at my computer atm but I think it was on the file or edit menu of the editor. Open the one for keynote and search for export. This will show you the supported commands. Usually it's something like "export ... with properties {option:something, option2:something} – Pat_Morita Apr 29 '17 at 12:43
  • Thanks @Pat_Morita! The option `with properties {movie format:large}` worked fine. This gives larger files, but my urgent need is kindof resolved. And I really appreciate this timely advice. However this solution takes more space than the custom solution (as described in the question). Whenever you get chance, please share any thoughts on custom options. Thanks again. – Shambho Apr 29 '17 at 13:31

1 Answers1

0

Once your in the applescript editor you can open a third party's applescript function library showing you the commands that are supported. I'm not at my computer atm but I think it was on the file or edit menu of the editor. Open the one for keynote and search for export. This will show you the supported commands.

Edit: After discussion it is the export option

{movie format:large}

Then I checked the online library. For compression you might also try

// applies to jpg images
{compression factor:0.5} // 50%

// applies to pdf 
{PDF image quality:good} //good, better, best

This is a pretty good page about it: https://iworkautomation.com/keynote/document-export.html

Pat_Morita
  • 3,355
  • 3
  • 25
  • 36