Been playing a bit with it... And some of it is giving me a hard time. This is what I made:
alias G6.Test {
;######G6 Inputs########
var %G6.ServerDomain = IceMan
;######Script Start########
G6.ComOpen
!.echo -q $com(G6, Status, 2, dispatch* oStatus)
!.echo -q $com(oStatus, Users, 2)
var %users = $com(oStatus).result
!.echo -q $com(oStatus, MemoryUsage, 2)
var %memory = $com(oStatus).result
!.echo -q $com(G6, Domains, 2, dispatch* oDomains)
!.echo -q $com(oDomains, Item, 3, bstr, %G6.ServerDomain, dispatch* oLocalhost)
!.echo -q $com(oLocalhost, Properties, 2, dispatch* oProperties)
!.echo -q $com(oProperties, Values, 3, bstr, StatsUploaded)
var %upbytes = $com(oProperties).result
:tongue:rint
echo -a Users Online: %users
echo -a Memory Usage: %memory
echo -a Bytes Uploaded: %upbytes
:error
echo -a 4 $error | /reseterror
G6.CloseAllCom
}
alias G6.ComOpen {
/comopen G6 G6FTPServer.Manager
if ($comerr) {
echo -a 4COM Open Failed
halt
}
}
alias G6.CloseAllCom {
//var %i = $com(0)
while ((%i != 0) && ($com(%i) != $null)) {
/comclose $v1
/dec %i
}
}
------------------
The error is in this line:
var %memory = $com(oStatus).result
the value is nothing...
but requested in VB you get the current memory load.
If you look at the Property format, it is returned in "__int64" format (see link below). But mirc doesn't know that so nothing is in it. Is there a way to fix that?
Have a look on the object here:
http://www.g6ftpserver.com/manuals/devguide_en/tlb.html#IServerStatus*