Sign in to follow this  
Followers 0
rakudave

Display CPU-load

11 posts in this topic




a simple GUI to display the CPU-load: left-click to move, right-click to switch from horizontal to vertical or vertical to horizontal...

suggestions to improve it?

I downloaded and tried it using the latest Beta and get the following errors

D:\AutoIT\cpu.au3 (15) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

$s = Stringsplit($s[2],"%")

$s = Stringsplit(^ ERROR



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

There were some errors in the script...this should work...pretty cool script.

-Livewire

cpu.au3

Edited by livewire

Share this post


Link to post
Share on other sites

There were some errors in the script...this should work...pretty cool script.

-Livewire

I must be missing something, perhaps a brain. Whet I Beta run the script all I get is like a minimised program titled R on my taskbar. I then can do nothing with it except abort the script from the systray.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

You should see a little rectangle on your screen which is a progress-bar that shows the percentage of CPU load.

-Livewire

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You should see a little rectangle on your screen which is a progress-bar that shows the percentage of CPU load.

-Livewire

Yes your right, it was not my brain that was missing just my glasses. ;):P:mad2:

Edit

It could be doing with some means of closing it other than aborting the script

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

@rakudave

When I read the statusbar, the result is: CPU Usage: XX%

Then I "StringSplit" this with " " and the result is:

$array[1] = CPU

$array[2] = Usage:

$array[3] = XX%

I remove the % and set Processbar to XX.

The info that you are receiving from the statusbar may be different for some reason. You also had a dash (-) in "Task-Manager"...mine doesn't. What version of Windows are you running?

-Livewire

Edited by livewire

Share this post


Link to post
Share on other sites

Very cool ;)

Maybe add this ?

Func OnAutoItExit()
     If ProcessExists("taskmgr.exe") Then ProcessClose("taskmgr.exe")
EndFunc

NOTE: OnAutoItExit func needs latest BETA... Also a good idea to place at end of script so it doesn't get in your way.


FootbaG

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0