Need to sleep after sending previous characters, not before

This commit is contained in:
Taliesin Sisson 2015-11-07 23:33:47 +00:00
parent bda2468404
commit 199bee6885
1 changed files with 4 additions and 4 deletions

View File

@ -782,10 +782,7 @@ param([string]$vmName, [string]$scanCodes)
if (!$timeToWait){
$timeToWait = "1"
}
write-host "Special code <wait> found, will sleep $timeToWait second(s) at this point."
Start-Sleep -s $timeToWait
if ($scanCodesToSend){
$scanCodesToSendByteArray = [byte[]]@($scanCodesToSend.Split(' ') | %{"0x$_"})
@ -794,6 +791,9 @@ param([string]$vmName, [string]$scanCodes)
}
}
write-host "Special code <wait> found, will sleep $timeToWait second(s) at this point."
Start-Sleep -s $timeToWait
$scanCodesToSend = ''
} else {
if ($scanCodesToSend){