script to display traffic information for NMDC hubserver

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
CapnStem
Posts: 5
Joined: 2003-01-21 09:39

script to display traffic information for NMDC hubserver

Post by CapnStem » 2003-03-09 02:50

Sorry if this has been asked before. Tried searching for "traffic" and "statistics" and no relevant stuff was found, so here goes...

The NMDC hub displays:

"Traffic: xxx bytes Uploaded / xxx bytes downloaded"

Is there a way to grab this info and put into a script for users to see?


TIA

ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Post by ButterflySoul » 2003-03-09 03:24

The NMDC hub displays:

"Traffic: xxx bytes Uploaded / xxx bytes downloaded"
Aye, in the frmHub.fraStatistics frame

Is there a way to grab this info and put into a script for users to see?
If I'm not mistaken, the raw data feeding fraStatistics is stored in frmHub.stsHub

In case stsHub includes the values of the 2 other stats (current users and peak users), you can remove them by respectively accessing frmHub.lblCurrentUsers and frmHub.lblPeakUsers, then cleanup from there =)
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-03-09 10:49

The string is in frmHub.stsHub.Panels(2).Text

smitty
Posts: 53
Joined: 2003-03-01 14:45

Post by smitty » 2003-03-09 13:04

Gadget do you have a text file together with all the hub controls and their functions spelled out...if so can you put it on your site...if not is there a possibility you could put one together and share it...might help the scripting community tremendously...thanks m8 for all you've done

ender
Posts: 224
Joined: 2003-01-03 17:47

Post by ender » 2003-03-09 14:44

Use this script:

Code: Select all

sub main()
  
  on error resume next
  Set IO = CreateObject("Scripting.FileSystemObject")
  Set file = IO.CreateTextFile("controls.txt", True)

  for each c in frmHub.Controls
    n = c.name
    t = ""
    t = c.caption
    i = -1
    i = c.index

    file.Write(n)
    if i>-1 then file.write("(" & i & ")")
    if t<>"" then file.write(" = """ & t & """")
    file.writeline
  next

  file.close
      
end sub
...and you'll get this (I sorted the file):
chkPrivateOnJoin = "Send On Join As Private Message"
cmdMassMsg = "Send Mass Private Message"
cmdMultiHubAdd = "Add"
DcSysTray
fraClientActions = "Actions"
fraClientInterations = "Client Interactions"
fraInvisControls = "Frame1"
fraMultiHub = "Multi-Hub Searching"
fraStatus = "Status Messages"
HubScripts(0)
HubScripts(1)
HubScripts(2)
Label1 = "Minimum of 6 characters"
lblNoEvents(10) = "Remote Port:"
lblNoEvents(11) = "Password:"
lblNoEvents(4) = "Min Client Version:"
lblNoEvents(5) = "On Join Message:"
lblNoEvents(8) = "Direct Connect supports multi-hub searching. When a Direct Connect client sends in a request for a multi-hub search this hub will forward the search request to all of the hubs on the list below, but only if you have permision to send the requests to them. To have permision means that your IP appears on this list on the other hub and your passwords match."
lblNoEvents(9) = "Remote IP:"
lstErrors
lstMultiHubs
lstOpActions
lstSelector
lstStatus
ScriptTimer(0)
ScriptTimer(1)
ScriptTimer(2)
smallIcons
stsHub
tmrFastBGWork
tmrSlowBGWork
txtMultiHubPass
txtMultiHubRemoteIP
txtMultiHubRemoteport
txtOnjoin
wskLoop(0)
wskReg
wskSearch

Locked