Page 1 of 1 1
Topic Options
#89334 - 2002-11-07 10:10 PM KiXforms - Process Monitor (pre-beta version)
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Any idea how I can turn the 'history' chart in this script into a line chart instead of a chart with 200 tiny columns?

I'm trying to make a "Process Monitor" to sniff out applications that are causing problems. The idea is to just chart the CPU, Mem, etc. that a single process is using versus the entire system.

code:
Break On CLS

;---------------------------------------------------------------------------
; Main Form
;---------------------------------------------------------------------------
$frmMain = CreateObject("Kixtart.Form")
$frmMain.Size = 300,220
$frmMain.Text = "Using KiXforms build "+$frmMain.Build

$prgCPU = $frmMain.ProgressBar
$prgCPU.ScaleHeight = 50
$prgCPU.ScaleWidth = 50
$prgCPU.Top = 5
$prgCPU.Left = 5
$prgCPU.ForeColor = Lawngreen
$prgCPU.BackColor = Black
$prgCPU.BorderStyle = 1
$prgCPU.Orientation = 1
$prgCPU.Style = 1
$prgCPU.Max = 100

$picCPU = $frmMain.PictureBox
$picCPU.ScaleHeight = 50
$picCPU.ScaleWidth = 200
$picCPU.ForeColor = Green
$picCPU.BackColor = Black
$picCPU.Top = $prgCPU.Top
$picCPU.Left = $prgCPU.Right + 5
For $y=10 to 50 step 10
$picCPU.Line(0,$y,200,$y)
Next
For $x=10 to 200 step 10
$picCPU.Line($x,0,$x,50)
Next

$picCPU.ForeColor = Lawngreen

$frmMain.Center
$frmMain.Show

While $frmMain.Visible
for $x = 0 to 199
$y=rnd(100)
$prgCPU.Value = $y
$picCPU.Line($x,50,$x,50-$y/2)
sleep 0.1
next
$nul=Execute($frmMain.DoEvents)
Loop

Exit(1)


Top
#89335 - 2002-11-07 10:38 PM Re: KiXforms - Process Monitor (pre-beta version)
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Nevermind, I figured it out.

code:
While $frmMain.Visible 
$y1=50
for $x = -5 to 199 step 5
$y=rnd(100)
$y2=50-$y/2
$prgCPU.Value = $y
$picCPU.Line($x,$y1,$x+5,$y2)
$y1=$y2
sleep 0.5
next
$nul=Execute($frmMain.DoEvents)
Loop



[ 07. November 2002, 23:05: Message edited by: Chris S. ]

Top
#89336 - 2002-11-07 10:39 PM Re: KiXforms - Process Monitor (pre-beta version)
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Is this it, cant really tell if its correct using random data:

code:
$py = 0
While $frmMain.Visible
for $x = 0 to 199
$y=rnd(100)
$prgCPU.Value = $y
$y = 50-$y/2
$picCPU.Line($x-1,$py,$x,$y) ; inverse
sleep 0.1
$py = $y
next
$nul=Execute($frmMain.DoEvents)
Loop


Top
#89337 - 2002-11-07 10:40 PM Re: KiXforms - Process Monitor (pre-beta version)
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
scary [Eek!]
Top
#89338 - 2002-11-07 10:40 PM Re: KiXforms - Process Monitor (pre-beta version)
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Beatcha by a minnit. [Wink]
Top
#89339 - 2002-11-07 10:46 PM Re: KiXforms - Process Monitor (pre-beta version)
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
I'm sitting here playing with this script and I gotta say...this is pretty [Cool] . I didn't think I could do something like this, but I tried anyway.

Thanks, Shawn, for the mondo cool toy. [Wink]

Top
#89340 - 2002-11-07 11:06 PM Re: KiXforms - Process Monitor (pre-beta version)
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Im sitting here playing with your script too !

[ 07. November 2002, 23:07: Message edited by: Shawn ]

Top
#89341 - 2002-11-07 11:08 PM Re: KiXforms - Process Monitor (pre-beta version)
Wizard Offline
Hey THIS is FUN
*****

Registered: 2000-12-05
Posts: 264
Loc: Bristol, England
Lads, please this is a family forum.! [Big Grin]

W
_________________________
Wizard
There's no place like 127.0.0.1

vb | kix | batch | html | cfm | js | english

Top
#89342 - 2002-11-07 11:09 PM Re: KiXforms - Process Monitor (pre-beta version)
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
roflmao
Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 671 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.057 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org