问题描述
此PowerPoint宏(在Windows中)将通过将演示文稿笔记中的前四个字符解析为OBS的击键来允许在OBS中更改场景。例如。 OBS1将在OBS中击键Control + 1,从而根据热键设置更改场景。
此宏在Mac上的Office 365上不起作用,因为该宏似乎无权访问任何应用程序。我猜想该操作必须重写宏以包含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