Jump to content

Dashboard - Keep an eye under the hood of your pc!


smbotans
 Share

Recommended Posts

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

i mean the width must be approx. 20 larger

because my diskcapacity isn't displayed correctly

i confirm the problem with the check for the floppy drive, i would change DriveGetDrive "ALL" to DriveGetDrive "Fixed" or exclude drives with DriveStatus = NotReady

or you can change your source with the following Remove your created $Disks = DriveGetDrive("All") and ignore my previous posting regarding auto resize.. replace everyting until $GUI

#include <GUIConstants.au3>
#include <Date.au3>
#include <Array.au3>

$Length = "368"
$Disks = DriveGetDrive("FIXED")
$Disks2 = DriveGetDrive("REMOVABLE")
if @Error <>  1 then 
    For $i = 1 to $Disks2[0]
        _ArrayAdd($Disks, $Disks2[$i])
    Next
EndIf
; if you want to add network drives also 
;$Disks3 = DriveGetDrive("NETWORK")
;if @Error <>  1 then 
;   For $i = 1 to $Disks3[0]
;       _ArrayAdd($Disks, $Disks3[$i])
;   Next
;EndIf


$MP = $disks[0]
$Length = ($Length + ($MP*17))

$gui = GUICreate("Dashboard", 170,$Length, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))

This will select all disks like your GUI says it does .. fixed and removable

Emiel

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

hi emiel,

thank you for your last 2 posts ... i will see what i can do with the drives problems via your code ... what is the difference between private ip and public ip? excuse my ignorance :)

i have made some changes to the program and i hope to upload it soon ... i have added a transparency feature + a customizable time feature (as i have a customer in the UK and sometimes need to know what time it is over there) ... these 2 features are accessible via shortcut keys and as such do not use use gui realestate

i have also ported some variables to an ini file eg. the battery warning popup limit, the number of transparencies to cycle through before reaching 100% again, the world time so folks can add their own country/city, and so on ...

i have also altered the amount displayed for each drive so that it always displays 3 digits depending on the size eg 345Gb. 45.6Gb, 3.48Gb, 465Mb ... no need to resize the gui now

serge

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Link to comment
Share on other sites

Hi Serge,

@IPAddress1 displays the first ipnumber which is given to a network interface in your computer

When your computer make a direct connection to the internet you can use @IPAdress1 but when you have a permanent connection and multiple computers the connection is made by a router or another device most of these devices uses NAT (Network address translation). NAT allows you to share your internet connection with multiple users on a single ipnumber. The computer gets a private ipaddress from the router throught DHCP (Most times). So this ipadress is always there.. even if there is no connection to the internet .

I Hope you understand what i'm trying to say.

Further .. what i ment regarding the harddisk size

when a drive has a capacity of 749,61GB and has 740,30GB free space the GUI is to small, the GB will be written on the next line

Would it be possible for you to update the code at the start of this thread so we can give some more advise and improve your wonderful idea

Emiel

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

Hi Serge,

@IPAddress1 displays the first ipnumber which is given to a network interface in your computer

When your computer make a direct connection to the internet you can use @IPAdress1 but when you have a permanent connection and multiple computers the connection is made by a router or another device most of these devices uses NAT (Network address translation). NAT allows you to share your internet connection with multiple users on a single ipnumber. The computer gets a private ipaddress from the router throught DHCP (Most times). So this ipadress is always there.. even if there is no connection to the internet .

I Hope you understand what i'm trying to say.

Further .. what i ment regarding the harddisk size

when a drive has a capacity of 749,61GB and has 740,30GB free space the GUI is to small, the GB will be written on the next line

Would it be possible for you to update the code at the start of this thread so we can give some more advise and improve your wonderful idea

Emiel

i have uploaded all the changes made to my initial post ... i understand about the ip thing ... what would you like me to do with it? add it as a CTRL-SHIFT-3 feature? have it displayed on the gui as an alternative as set in the ini file?

the drive numbers issue should be resolved now

serge

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Link to comment
Share on other sites

i have uploaded all the changes made to my initial post ... i understand about the ip thing ... what would you like me to do with it? add it as a CTRL-SHIFT-3 feature? have it displayed on the gui as an alternative as set in the ini file?

the drive numbers issue should be resolved now

serge

If i were you i would add my option as default, which i believe should also works for you. Change the way an internet connection is detected for example to ping www.google.com (maybe there is some other method)

example

AdlibEnable (CheckConnection, 5000) ; Check every 5000 miliseconds if an internet connection is available. Only one adlibenable can be active at the same time

Func CheckConnection ()
        $var = Ping("www.google.com", 4000)
        If $var = 0 then 
            ; no connection make red
        else
            ; connection make green
        endif      
EndFunc

Your 100% CPU problem is caused by the way you check for CPU Usage..

if i've seen it correct you count the % used by processes but this is not accurate because if someone has a dualcore or actually has two processors .. it could go to 200% (correct me if i'm wrong)

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

Your 100% CPU problem is caused by the way you check for CPU Usage..

if i've seen it correct you count the % used by processes but this is not accurate because if someone has a dualcore or actually has two processors .. it could go to 200% (correct me if i'm wrong)

that part of the script is not mine, i found it after doing a search of the forum ... if you know of a more reliable way to determine cpu %, please let me know ... from memory, i posted a query about using wmi but no one answered, i will have a look once again

your ping idea is good but i prefer something local without needing to access the net all the time

serge

ps. i noticed an error in the worldtime popup, i will fix that up soon

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Link to comment
Share on other sites

Great script! Very useful, but I did notice a few things.

1) The CPU bar repeatedly peg out OVER 100% as the workstation was under load. It should 118% at one point :S

2) Support for additional drives would be awesome. I have a crap load of hard drives, removable media (thumb drives), network drives, etc. A Read/Write on them would be cool :)

3) Temp and fan monitor would be cool also

4) Network bandwidth/utilization indicator would be cool to.

Otherwise good job. Thanks!

MePH

i was thinking ... i could add an ini option that replaces the battery info displayed by a network thingy you suggested

problem is: i need someone to put the code together for me as i don't have a network and don't have access to one + the network info displayed has to fit in the current BATTERY space on the gui

i figured that desktops would typically be on the a network (as opposed to laptops) and hence the BATTERY box on the gui is of no use ... might as well 'recycle' it

serge

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Link to comment
Share on other sites

@Serge

I use compinfo http://www.autoitscript.com/forum/index.ph...hl=compinfo.au3

the below example is for one processor to X processors

; The next line will retrieve the processor information

_ComputerGetProcessors($Processors)

Dim $CPUGraphic[$Processors[0][0] + 1]

in your Gui Something like this (you must change to value's to your need)

GUICtrlCreateLabel("CPU Usage", 30, 160, 70, 17)

$CPUGraphic[$i] = GUICtrlCreateProgress(170, 160, 200, 17, 0x1)

in your While/Wend loop

For $i = 1 To $Processors[0][0]

If $Processors[$i][21] > 79 And $Processors[$i][21] < 90 Then

GUICtrlSetColor($CPUGraphic[$i], 0xFFFF00) ; yellow

ElseIf $Processors[$i][21] > 89 Then

GUICtrlSetColor($CPUGraphic[$i], 0xFF0000) ; red

Else

GUICtrlSetColor($CPUGraphic[$], 0x00CC00) ; green

EndIf

If you only want one CPU Usage Graph, you could count all the CPU information where $Processors[0][0] is the amount of CPU's to count and 100 is the maximum of one processor so 200 is the maximum of 2 processors

Emiel

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

@Serge

I use compinfo http://www.autoitscript.com/forum/index.ph...hl=compinfo.au3

the below example is for one processor to X processors

; The next line will retrieve the processor information

_ComputerGetProcessors($Processors)

Dim $CPUGraphic[$Processors[0][0] + 1]

in your Gui Something like this (you must change to value's to your need)

GUICtrlCreateLabel("CPU Usage", 30, 160, 70, 17)

$CPUGraphic[$i] = GUICtrlCreateProgress(170, 160, 200, 17, 0x1)

in your While/Wend loop

For $i = 1 To $Processors[0][0]

If $Processors[$i][21] > 79 And $Processors[$i][21] < 90 Then

GUICtrlSetColor($CPUGraphic[$i], 0xFFFF00) ; yellow

ElseIf $Processors[$i][21] > 89 Then

GUICtrlSetColor($CPUGraphic[$i], 0xFF0000) ; red

Else

GUICtrlSetColor($CPUGraphic[$], 0x00CC00) ; green

EndIf

If you only want one CPU Usage Graph, you could count all the CPU information where $Processors[0][0] is the amount of CPU's to count and 100 is the maximum of one processor so 200 is the maximum of 2 processors

Emiel

thanks for that emiel ... i added your code and found that my cpu runs a lot lower using this method ... even 0% at times ... does that sound right to you?

serge

ps it seems to be the same method i commented in my code as an alternative ... i wasn't sure about it either as it too shows low cpu usage

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Link to comment
Share on other sites

emiel,

i tried the code you posted but it causes a memory leak, so i won't be using it ... thanks just the same :)

the alternative cpu code i mentioned in my code also causes a memory leak ... must have something to do with the wmi call

serge

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...