Hi
I made a small script that displays some information via HTML and Internet Explorer:
$ie = New-Object -com internetexplorer.application;
$ie.navigate2("about:blank")
$ie.document.body.innerHTML = $html
$ie.visible = $true
$ie.MenuBar = $false
$ie.AddressBar = $false
$ie.StatusBar = $false
$ie.ToolBar = $false
This works well. The problem is that i made some buttons on the page that should refresh the content. But when powershell needs to pull that information:
do {
if ($ie.Document.getElementByID("finished").value -eq 1) {
$skip = $true
}
if ($ie.Document.getElementByID("autorefresh").value -eq 1) {
$autorefresh = $true
}
Start-Sleep -Milliseconds 500
} until (($autorefresh -eq $true) -or ($skip -eq $true))
I get a high CPU load (40-45%).
Is this normal, or should it be done another way?


