Scripting Counters

Using a Download/Upload Meter to learn DX Coding

Hi folks

I'm an experienced VB Coder, but have never dabbled with counters

I've just downloaded DesktopX and see that some of the themes have download/upload meters that use counters (performance meters)

What I was wondering was - how do I use them? I've created a new object, set it as a text object, added in Performance Counters 2 - and then get stuck - can't seem to find what to do next so that it shows me my bandwidth usage

Any ideas?

Thanks in advance
3,591 views 2 replies
Reply #1 Top
OK using Performance Meters plug-in: You need 2 images, 1 for the Filled Area 1 for the Unfilled (Background) then in the Second tab (I forget the label) select which counter you would like to use this ranges from Processor load, Bandwidth (In and Out). Otherwise you can use WMI (Windows Management Instrumentation) to gather specific system details in Text form.. More info when I get on laptop and have some code at hand.. Be patient! Basically you can open a scripting window for an Object and select the "Help" menu and then "Resources" which should take you to a Stardock guide.. choose the "Developers Guide" on the Left hand side menu
Reply #2 Top
Once you've added the Performance Meters 2 Additional Ability, which will display as Graphical Performance Meters in the box, you must click on the name "Graphical Performance Meters".

Then you can click the configure button. This will bring up the Performance Meter panel, and you can set up your meter. You don't have to use images, you can set the meter to display using solid colors as well.

The Chart Type dropdown lists the various graphic displays. You can also set it up to change the text of a text object by selecting the Object ID from the Set Text of Object drop down.

Click the Data Source panel to set up what you wish to monitor. For a Net Traffic meter, select System Performance meter, Change Button, choose Network Interface from Performance Object drop down. It should select the Bytes Total/sec counter automatically. Choose which device to monitor on the right, then click OK.

There's a lot you can do with these panels, but that should get you started!


As a note, Net Traffic monitors like this have to be manually set up to the right network interface device. Most of the Net Traffic DX widgets actually don't use the Performance Meters 2 plug-in, but rather access the WMI directly from script, which allows a bit more versatility. The plug-in does work, though, and can be handy.