使用Leap motion和Python控制Powerpoint [英] Controlling Powerpoint using Leap motion and Python

查看:279
本文介绍了使用Leap motion和Python控制Powerpoint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用python。我最近有一个项目需要制作PowerPoint幻灯片,必须使用 leap motion sdk和python 完成。所以我的powerpoint将基于手势

I just started up with python.I lately got a project where I have to make a powerpoint slideshow.This has to be done using leap motion sdk and python.So my powerpoint will be gesture based.


  1. 如何在
    中将其部署在桌面上,以至于我只需要单击桌面应用程序或ppt文件本身,我得到了
    ,就像在Windows上一样,都是从powerpoint开始的。

  2. 我需要使用python检测手指手势并将其
    集成到下一个-上一个功能。

  1. How do I deploy this on my desktop in such a away that I just need to click on my desktop app or the ppt file itself, I get started with the powerpoint like on windows.
  2. I need to detect the finger gestures using python and integrate it to next - previous functionality.

我可以在PPT上获得有关Powerpoint的一些指导吗?

Can I get some guidance on powerpoint with PPT?

我有 API 文档,SDK,我正在学习 python

I have got the API,Documentation,SDK and I am learning python too.

推荐答案

pywin32 库具有 win32com.client 模块,该模块可让您使用 COM 用于控制PowerPoint的API。

The pywin32 library has a win32com.client module that lets you use COM API to control PowerPoint.

例如,此代码将添加带有椭圆形:

For example, this code will add a slide with an oval in it:

import win32com.client

Application = win32com.client.Dispatch("PowerPoint.Application")
Presentation = Application.Presentations.Add()
Base = Presentation.Slides.Add(1, 12)
oval = Base.Shapes.AddShape(9, 100, 100, 100, 100)

IPython笔记本提供了有关如何创建PowerPoint演示文稿,向其中添加对象的分步示例它,并使这些对象在PowerPoin中进行交互t。

This IPython notebook has step-by-step examples on how to create a PowerPoint presentation, add objects to it, and make those objects interact in PowerPoint.

虽然这将允许您将PowerPoint用作输出接口,但是您需要一种不同的机制来将消息从PowerPoint发送回Python 。一种方法是设置一个在与<​​a href=\"http://oreilly.com/catalog/pythonwin32/chapter/ch12.html\" rel=\"noreferrer\"> COM服务器集进行交互的click事件上运行的宏。在Python中。

While this will allow you to use PowerPoint as an output interface, you need a different mechanism for sending messages back from PowerPoint to Python. One way is to set up a Macro that runs on a click event that interacts with a COM server set up in Python.

这篇关于使用Leap motion和Python控制Powerpoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆