【问题标题】:How to execute this PowerPoint Macro for OBS on macOS Big Sur?如何在 macOS Big Sur 上为 OBS 执行此 PowerPoint 宏?
【发布时间】:2021-01-01 06:48:18
【问题描述】:

此 PowerPoint 宏(在 Windows 中)将允许在 OBS 中更改场景,方法是获取演示文稿注释中的前四个字符并将它们解析为 OBS 的击键。例如。 OBS1会在OBS中按键Control+1,从而根据热键设置改变场景。

此宏不适用于 Office 365 for Mac,因为该宏似乎无权访问任何应用程序。我想必须重写宏以包含此操作的 AppleScript,还是我错了?

我该怎么做?

原始宏:

Sub OnSlideShowPageChange()
Dim i As Integer
Dim sNotes As String
Dim sKey As String

i = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
s = Left(ActivePresentation.Slides(i).NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.Text, 4)

If Left(s, 3) = "OBS" Then
sKey = "^" & Right(s, 1)
AppActivate ("OBS")
SendKeys (sKey), 1
AppActivate ("PowerPoint")
End If
End Sub

参考资料: 原创思路:https://obsproject.com/forum/resources/powerpoint-macro-for-controlling-obs.1061/ 带有 VB 的 AppleScript:https://docs.microsoft.com/en-us/office/vba/office-mac/applescripttask

【问题讨论】:

    标签: vba applescript powerpoint obs


    【解决方案1】:

    我写 python 来实现的是 Scott Hanselman 是doing。你可以找到我的 obsPPTXwithPython 仓库here。

    这不是我避免使用的 VBA。您需要了解一些 python 才能使用它,如果没有帮助,请见谅。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-24
      • 2020-10-20
      • 1970-01-01
      • 1970-01-01
      • 2021-06-19
      • 2021-08-04
      • 2021-05-31
      • 2021-06-08
      相关资源
      最近更新 更多