Hi
i want to get the value from a PDHMeter (CPU-meter), change the value, and give it to the sysstats-overlay (CPU-text). My problem, that i want to fix this way, is that the cpu-meter gives me wrong values; if i choose "ProcessTime->_TOTAL", i´ll get the value 100.
So i have to choose "ProcessTime->_IDLE"; this gives me a right value. But ProcessTime _TOTAL is 100-_IDLE, you know.
So, i guess i need a VB-script to get and put the value.
This is what i´ve done:
- i inserted a ScriptMeterClass called ScriptMeter.
- the overlay "CPU % Text" is configured by the ScriptMeter
i never made anything in VB, but tried to make it....but no success.
This is my VB-file:
Function ScriptMeter_GetValue(selector)
DIM meter
Set meter = SysStatsModel.Meters(0)
ScriptMeter_GetValue = meter.GetAsLong(selector)
End Function
Function ScriptMeter_PutValue(myValue)
myValue = 50
End Function
...just for testing i tried to put the value 50 to the meter, but no success.
Can someone please help me?
---------------
hi
thanx for the high count of replies....
You guys call yourself "programmer" ? Go out to find another hobby.
No experience in vb. Took me 1 hour to make it work.
//Posts Merged, Thread Moved (thanks SirSmiley), Member Warned.
Double-posting and sarcastic complaining == not cool. See that it doesn't happen again
. -NC
P.S: I was going to write some pseudocode or PHP code about incrementing counters and banning, but I didn't feel like it. Seriously though, the attitude isn't cool.
Aqua-Soft Forums