vba - 如何在 macOS Big Sur 上为 OBS 执行此 PowerPoint 宏?
问题描述
此 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/ AppleScript 与 VB:https ://docs.microsoft.com/en-us/office/vba /office-mac/applescripttask
解决方案
推荐阅读
- swift - 使用 Alamofire 结果和 present() 切换视图
- javascript - slate js:如何在悬停时突出显示具有相同标记的相邻组件?
- firebase - 如何在预定的 firebase 函数中调用 https firebase 函数以使其保持温暖并避免冷启动
- c# - RedirectToAction 到 ASP.NET MVC 中的异步方法
- c# - 如何仅使用 for 循环检查 2d 数组是否唯一
- reactjs - 如何在 Gatsby 的模板组件中访问上下文变量?
- sql - SQL Server:按特定日期将数据从一个数据库插入另一个数据库结构
- omnet++ - 如何访问 Veins 4.7.1 中的所有车辆信息?
- python - 错误 - 字符串索引必须是整数;使用 pandas 列作为字典的值
- flutter - 如何在 Android 中崩溃时关闭 Flutter 程序?目前该应用程序只显示一个 debugBanner