# assuming standard install location & C:\Users\${Env:UserName}\AppData\Local\Programs\LNV\Stremio-4\stremio.exe Write-Host -NoNewLine "Waiting for Stremio window to be created" $wshell = New-Object -ComObject wscript.shell $attemps = 0 Do { $wshell.AppActivate('stremio') | Out-Null $success = $? if (-not $success) { if ($attempts % 3 -eq 0) { Write-Host -NoNewLine "." } $attempts++ } Start-Sleep 1 } Until ($success -or $attempts -ge 30) if ($success) { # might want to tweak the delay Start-Sleep 1.5 $wshell.SendKeys('{F11}') }