Export Keynote slides to PDF with Keyboard Maestro

I write most of my slides for teaching in Keynote and, as much as I like it for making easy to read slides that are (relatively) nice to look at, it does have some annoyances. The main one for me is when exporting the files for uploading to our course management system. I export everything meant for the students, including Keynote slides, to PDF. It looks the same for all students and with about half of the students using Macs and the other half using Windows, I do not have to worry about them not being able to read it. Now, Keynote has an export option, but for some unfathomable reason it does not remember my preferences from one time to the next and always show the following menu:Keynote's export window

But I want the slides without border, dates, and without showing each builds every single time. I could, of course, click on the check boxes each time I export a set of slides but that gets old really quickly. Keyboard Maestro and some Applescript to the rescue! The screenshot below is of the macro I ended up putting together. Now I only have to use a keyboard short-cut and my slides are ready to download in exactly the format I like them. Keyboard Maestro macro

It took longer to write this than it should have, mainly because I had forgotten how particular Applescript is about referring to windows and sheets. I am sure this could have been written more efficiently but it works and if you want, say, slide numbers you can just change that part of the macro. If you are interested you can download the Keyboard Maestro macro here. As always, use at your own risk.