Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My solution #2

Open
LSkerkova opened this issue Apr 28, 2017 · 0 comments
Open

My solution #2

LSkerkova opened this issue Apr 28, 2017 · 0 comments

Comments

@LSkerkova
Copy link

Hallo, I had the same problem with 2000 miliseconds. Now I do not use get-uiatext and for long refreshing i changed sleep -Seconds 120, then refreshing is ok.

function WaitLoadDialog(){
$null = TestUnknownMessageDialog
while(TestLoadDialog){
#$null = TestUnknownMessageDialog
try{$text = $null
$text += $window | Get-UiaChildWindow | Read-UiaControlAutomationId}
#Get-UiaChildWindow | Get-UiaText -Timeout 150000 | Read-UiaControlName}
catch [Exception]{Write-Error $_.Exception.Message}
if ($text -match "error"){
Write-Error "Error. $text"
} else {
sleep -Seconds 120
"*" }}}

Then I had problem with saving, it worked only for first time. Now I save with press Ctrl+s

$null = $window.Keyboard.KeyPress([System.Windows.Forms.SendKeys]::SendWait("^{s}"))

#$null = $window.Keyboard.KeyPress([WindowsInput.Native.VirtualKeyCode]::LMENU)
#$null = $window.Keyboard.TypeText("FS")

It works but not ideally because the rectangle of the refresh window remains after end of script.
I will be grateful for your feedback.

Nice day Lidka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant