powershell - 尝试使用 sendkey
问题描述
第一个SendKeys "%H"
是公认的。我在报告中看到了结果。然而,“R”不是。
Reports\Templates\Sensor_Exporter\Master8.pbix
Start-Sleep -s 15
$wshell = New-Object -ComObject WScript.Shell
[void][System.Reflection.Assembly]::LoadWithPartialName("'Microsoft.VisualBasic");
[Microsoft.VisualBasic.Interaction]::AppActivate("Master8 - Power BI Desktop");
Start-Sleep -s 5
$wshell.SendKeys("%H")
$wshell.SendKeys("R")
解决方案
只需将 start-sleep -s 2 放在两个 sendkey 之间就可以了。
推荐阅读
- html - 具有一些不透明度的 div 在页面滚动时隐藏固定 div
- r - 将三重嵌套列表转换为数据框
- django - Django Rest框架-获取总行数
- r - 使用多条线添加两条平滑线
- python - 对符合条件的行的列子集进行排序
- android - 使用相同的按钮暂停 Android 倒计时
- python - 导入的模块应该如何访问全局常量(VERBOSE=True)等?
- jenkins - Jenkins 的工作可以观察一个 repo 的变化,以触发另一个 repo 的构建吗?
- c# - 从该对象中的脚本激活和停用该对象上的脚本(初学者的麻烦)
- python - 未找到 Python Linux Google drive API 客户端安装模块