1

The first SendKeys "%H" is recognized. I see the result in the report. However the "R" is not.

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")
1
  • Why not $wshell.SendKeys("%HR")
    – marsze
    Jan 31, 2019 at 16:25

1 Answer 1

0

Just had to put start-sleep -s 2 between the two sendkey Its working now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.