如何使用 Applescript 获取 Keynote 中幻灯片的大小(高度和宽度)
我正在为 Keynote 开发注释产品。
我想做的是:当 Keynote 进入幻灯片放映模式时,我想在幻灯片上注释(绘图)。注释被捕获到图像文件中,然后我想使用 Applescript 将它们覆盖在 Keynote 幻灯片的顶部。
我已经完成了大部分工作,除了当主题演讲进入幻灯片放映模式时,我需要知道用户选择的幻灯片的尺寸(高度和宽度),以便我可以将图像缩放和裁剪为幻灯片的尺寸。如果我没有正确执行此操作,Keynote 会将图像缩放到幻灯片的大小,并且注释将不会位于正确的位置。我已经证明这是有效的,因为现在,在我注释之前,我要求用户在开始注释之前选择幻灯片分辨率,这非常有效。但我想自动化这个。在 Keynote 中,似乎没有办法使用 Applescript 来做到这一点。
如果有人有任何想法,那就太好了。
I am working on an annotation product for Keynote.
What I want to do is this: when Keynote goes into slide show mode, I want to annotate (draw on) the slides. The annotations are captured into an image file, and then I want to overlay them on top of the Keynote slide with Applescript.
I have got most of this working except that when keynote goes it to slide show mode, I need to know the size (height and width) the slide that the user selected so I can scale and crop the image to the size of the slide. If I don't do this correctly, Keynote will scale the image to the size of the slide and the annotations will not be in the correct place. I already proved that this works because right now, before I annotate, I ask the user to select the slide resolution before I start the annotation, and that works great. But I want to automate this. In Keynote, there seems no way to do this using Applescript.
If anyone has any ideas, that would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它并不能完全解决问题,但可能会对您有所帮助。默认主题大小存储在 Keynote 的 plist 文件中,您可以使用 Cocoa 轻松访问和读取该文件。
It doesn't entirely solve the problem but it might help you on your way. The default theme size is stored in the plist file for Keynote which you could easily access and read using Cocoa.