I am populating a listview with a 'default icon (32) and then later on the script does some testing and then changes (32) into (9 or 34)

problem is, the icon doesn't change...

code:
Function PCStatus()
DIM $mac,$name

for each $item in $list.items
$name=$item.SubItems(1).Text
if wshping($name)[1] >0
$Item.subitems(0).icon=34
else
$return = EnumMAC('164.51.34.5',$name)
if not @error
$mac = $return[2,0]
shell 'cmd /c \\a06\logon\tools\wol.exe ' + $mac +' > nul'
sleep 10
if wshping($name)[1] >0
$Item.subitems(0).icon=34
else
$Item.subitems(0).icon=9
endif
else
$Item.subitems(0).icon=9
endif
endif
$list.refresh
next
EndFunction

help...
_________________________
How to ask questions the smart way <-----------> Before you ask