Script access overlay items

Hi,

I'm using avedesk and sysstat for a few days and i'm trying to write a script (this is the first time i write a script) to get my ip but i've an error

Objet requis: 'SysStatsModel.Overlays(...)' at line 20, char 5: (null)

I don't understand what I need to put there. I've an CompositeOverlayClass called "Network" which contains an TextOverlayClass called "network_ext_ip"

here is the full script

const URL = "c:xml.xml" 'http://xml.showmyip.com/



Function MiseAJourIP()

Dim aveDesk

'Dim item

set aveDesk = CreateObject("AveDesk.Application")

set xmldoc = CreateObject("Microsoft.XMLDOM")

xmldoc.async=false

xmldoc.load(URL)

if Not AveDesk is Nothing Then

'set item = SysStatsModel.Overlays("network")

for each x in xmldoc.documentElement.childNodes

if x.NodeName = "ip" then

SysStatsModel.Overlays("network").Item("netwok_ip_ext").format= "ip: " & x.text

'item.Overlays("network_ext_ip").format = "ip: " & x.text

end if

next

end if

wscript.echo myip

End Function





Function ScriptController_HandleMessage(wparam, lparam, x, y)

Select Case wparam

Case 0

MiseAJourIP()

End Select

ScriptController_HandleMessage = true

End Function

#443229