smbotans Posted December 26, 2007 Author Posted December 26, 2007 Great script but it eats my memory Can you check it?GreetsDizzythe version available does have a memory leak which i have since fixed ... i will post the fix soonserge 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.
smbotans Posted December 26, 2007 Author Posted December 26, 2007 CAn get this to doc to the sitebar?i don't know how to do that as yetserge 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.
Emiel Wieldraaijer Posted December 26, 2007 Posted December 26, 2007 @Serge, You'll have the change the width, make the GUI a bit larger Best regards, Emiel Best regards,Emiel Wieldraaijer
smbotans Posted December 28, 2007 Author Posted December 28, 2007 @Serge,You'll have the change the width, make the GUI a bit largerBest regards,Emielhow much larger? and why? is it accommodate really large drives?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.
Emiel Wieldraaijer Posted December 28, 2007 Posted December 28, 2007 (edited) 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 December 28, 2007 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer
Emiel Wieldraaijer Posted December 29, 2007 Posted December 29, 2007 HI Serge, another improvement of your dashboard #include <Inet.au3> $PublicIP = _GetIP() MsgBox(0, "IP Address", "Your IP Address is: " & $PublicIP) This retrieves your public IP instead of your local ipnumber Best regards, Emiel Best regards,Emiel Wieldraaijer
smbotans Posted December 30, 2007 Author Posted December 30, 2007 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.
Emiel Wieldraaijer Posted December 30, 2007 Posted December 30, 2007 (edited) 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 December 30, 2007 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer
smbotans Posted December 31, 2007 Author Posted December 31, 2007 Hi Serge,@IPAddress1 displays the first ipnumber which is given to a network interface in your computerWhen 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 ideaEmieli 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 nowserge 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.
Emiel Wieldraaijer Posted January 1, 2008 Posted January 1, 2008 (edited) 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 January 1, 2008 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer
smbotans Posted January 2, 2008 Author Posted January 2, 2008 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 againyour ping idea is good but i prefer something local without needing to access the net all the timesergeps. 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.
smbotans Posted January 5, 2008 Author Posted January 5, 2008 emiel, i have added the option to use private or public ip ... this can be set via the ini file 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.
smbotans Posted January 5, 2008 Author Posted January 5, 2008 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 :S2) 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 also4) Network bandwidth/utilization indicator would be cool to.Otherwise good job. Thanks!MePHi was thinking ... i could add an ini option that replaces the battery info displayed by a network thingy you suggestedproblem 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 guii 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.
Emiel Wieldraaijer Posted January 5, 2008 Posted January 5, 2008 @SergeI use compinfo http://www.autoitscript.com/forum/index.ph...hl=compinfo.au3the 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) ; yellowElseIf $Processors[$i][21] > 89 Then GUICtrlSetColor($CPUGraphic[$i], 0xFF0000) ; redElse GUICtrlSetColor($CPUGraphic[$], 0x00CC00) ; greenEndIfIf 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 processorsEmiel Best regards,Emiel Wieldraaijer
smbotans Posted January 7, 2008 Author Posted January 7, 2008 @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.
smbotans Posted January 11, 2008 Author Posted January 11, 2008 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now