Sleno
Sleno is a lightweight package that allows you to easily control PowerPoint & Keynote presentations through a simple Deno API
This package is a port of the Slideshow package, as such it has support for Microsoft PowerPoint 2010/2013/2016 for Windows, Microsoft PowerPoint 2011/2016 for Mac OS X and Apple KeyNote 5/6 for Mac OS X. It can determine the current state of the application, gather information about the slides and control the application's slideshow mode. It is implemented as a thin Deno API layer on top of platform-specific Windows WSH/JScript and Mac OS X Automator AppleScript/JavaScript connectors.
Getting started
Since Deno uses URL based imports we don't need to install anything to get started!
// Import the Sleno package
import Sleno from "https://deno.land/x/sleno/index.ts";
(async () => {
// Create a "Sleno" instance for PowerPoint on MacOS
const sleno = new Sleno("PowerPoint", "MacOS");
// Start PowerPoint
await sleno.boot();
// Open the pptx PowerPoint file
await sleno.open("sample.pptx");
// Start the presentation full-screen
await sleno.start();
})();
There are many more functions that you can check out in your IDE through the power of TypeScript and JSDoc!
Support
SUPPORTED: Microsoft PowerPoint 2010 under Windows:
Fully supported throughconnector-win-ppt2010
, which uses Windows Scripting Host (WST)'s JScript engine and the Component Object Model (COM) of PowerPoint.(probably) SUPPORTED: Microsoft PowerPoint 2011 under Windows:
Expected to be supported (but not tested by the author) throughconnector-win-ppt2010
, which uses Windows Scripting Host (WST)'s JScript engine and the Component Object Model (COM) of PowerPoint.(probably) SUPPORTED: Microsoft PowerPoint 2013 under Windows:
Expected to be supported (but not tested by the author) throughconnector-win-ppt2010
, which uses Windows Scripting Host (WST)'s JScript engine and the Component Object Model (COM) of PowerPoint.(probably) SUPPORTED: Microsoft PowerPoint 2016 under Windows:
Expected to be supported (but not tested by the author) throughconnector-win-ppt2010
, which uses Windows Scripting Host (WST)'s JScript engine and the Component Object Model (COM) of PowerPoint.(probably) SUPPORTED: Microsoft PowerPoint 2019 under Windows:
Expected to be supported (but not tested by the author) throughconnector-win-ppt2010
, which uses Windows Scripting Host (WST)'s JScript engine and the Component Object Model (COM) of PowerPoint.SUPPORTED: Microsoft PowerPoint 2019 under Windows:
Expected to be supported (but not tested by the author) throughconnector-win-ppt2010
, which uses Windows Scripting Host (WST)'s JScript engine and the Component Object Model (COM) of PowerPoint.SUPPORTED: Microsoft PowerPoint 2011 under Mac OS X:
Fully supported throughconnector-osx-ppt2011
, which uses AppleScript engine and the application Dictionary of the PowerPoint.SUPPORTED: Microsoft PowerPoint 2016 under Mac OS X:
Fully supported throughconnector-osx-ppt2011
, which uses AppleScript engine and the application Dictionary of the PowerPoint.SUPPORTED: Microsoft PowerPoint 2019 under Mac OS X:
Fully supported throughconnector-osx-ppt2011
, which uses AppleScript engine and the application Dictionary of the PowerPoint.SUPPORTED: Apple Keynote 5 under Mac OS X:
Fully supported throughconnector-osx-kn5
, which uses AppleScript engine and the application Dictionary of Keynote.(partially) SUPPORTED: Apple Keynote 6 under Mac OS X:
Partially supported throughconnector-osx-kn6
, which uses AppleScript engine and the application Dictionary of Keynote. Currently partially broken up to at least Keynote 6.2.2 (August 2014), because the AppleScript support in Keynote 6 still lacks many things Keynote 5 already supported. The main problem currently is that one cannot detect whether a slideshow is playing and that slide changing is reflected in AppleScript only once the Keynote window lost its focus.
Acknowledgement
I barely wrote any of this package, I took the Slideshow package and rewrote the JavaScript layer into a Deno class, as such I've barely done any of the research for this package. I want to give a huge thanks to Dr. Ralf S. Engelschall for writing the bulk of the code for this package (and most of the readme.md)!
License
This project is licensed under the MIT License - see the LICENSE.md file for details