Hi everyone. Please look at my code and let me know how I can improve handling of arrays.
$ie=new-object -comobject internetexplorer.application;
$ie.navigate("
http://movies.yahoo.com/showtimes-t...8082&r=sim");
$ie.visible=$true;
while($ie.busy) {start-sleep -s 2}
[string]$a = $ie.document.documentElement.innertext.split("`n") | % { if ($_.length -lt 4) { "|`n" } else { $_ + "`n"}} ; $b = $a.split("|");
$look4 = "Iron" ; $c = ($b | ? {$_ -match $look4})
; $C | foreach-object { $d = $_.split("`n"); $dcnt = 0 ; $d | % { $dcnt += 1 ; if ($_ -match $look4) {"`n" + $d[1].replace("Click on showtime or Tickets button to buy tickets.","").replace(" Sign in to save this theater","") + "`n`t" + $d[$dcnt - 1] + "`t" + $d[$dcnt] + "`n`t" + $D[$dcnt + 1] }}}
Thank you.