Vba 如何在macOS Big Sur上为OBS执行此PowerPoint宏?
此PowerPoint宏(在Windows中)将允许在OBS中更改场景,方法是将演示文稿笔记中的前四个字符作为键盘输入OBS并对其进行解析。例如,OBS1将在OBS中击键Control+1,从而根据热键设置更改场景 此宏无法在Office 365 for Mac上运行,因为该宏似乎无法访问任何应用程序。我猜宏必须重新编写以包含此操作的AppleScript,还是我错了 我该怎么做呢 原始宏:Vba 如何在macOS Big Sur上为OBS执行此PowerPoint宏?,vba,applescript,powerpoint,obs,Vba,Applescript,Powerpoint,Obs,此PowerPoint宏(在Windows中)将允许在OBS中更改场景,方法是将演示文稿笔记中的前四个字符作为键盘输入OBS并对其进行解析。例如,OBS1将在OBS中击键Control+1,从而根据热键设置更改场景 此宏无法在Office 365 for Mac上运行,因为该宏似乎无法访问任何应用程序。我猜宏必须重新编写以包含此操作的AppleScript,还是我错了 我该怎么做呢 原始宏: Sub OnSlideShowPageChange() Dim i As Integer Dim sNo
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
参考文献:
创意:
AppleScript with VB:我编写python来实现的是Scott Hanselman。您可以找到我的obsPPTXwithPython存储库
这不是VBA,这是我避免的。您需要了解一些python才能使用它,如果它没有帮助,那么很抱歉。我已经编写了python来实现Scott Hanselman的目标。您可以找到我的obsPPTXwithPython存储库 这不是VBA,这是我避免的。您需要了解一些python才能使用它,如果它没有帮助,那么很抱歉