Jump to content

Autoit SysInfo Clock v0.9.9.7 build 2014-08-27 beta


UEZ
 Share

Recommended Posts

Hmm, this is Ascend4nt's baby. Maybe he can jump in and troubleshoot his _PDH_PerformanceCounters UDF or tell us what's wrong with the perf. counters.

Br,

UEZ

 

_PDH_Init() can return failure - you definitely should add that check to the script and alert the user.  It checks whether Performance Counters are enabled in the registry, as well as if it can load the PDH.DLL.

There's also functions that can be used to check or modify the registry:

_PDH_RegistryCheck()

_PDH_RegistryEnable()

_PDH_RegistryDisable()

For more output to the console, set $PDH_DEBUGLOG = 2 (AFTER the #include "_PDH_PerformanceCounters.au3" line)

Link to comment
Share on other sites

@Ascend4nt: thanks for the information!

Do you know a simple extracted version to get current CPU speed?

@mesale0077: glad to hear that you like and use it!

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

You could use my >% System CPU Usage example (included as 'TestPDH_CPUUsage' with the Performance Counters bundle).  I actually just updated the post to exit with a message if _PDH_Init() fails. (after all, I should follow my own advice!)

By the way, there's no need in your code to get the # of CPU's since _PDH_Init() does that as part of initialization, and stores the count in the global variable $_PDH_iCPUCount.

Link to comment
Share on other sites

You could use my >% System CPU Usage example (included as 'TestPDH_CPUUsage' with the Performance Counters bundle).  I actually just updated the post to exit with a message if _PDH_Init() fails. (after all, I should follow my own advice!)

Thanks for the update. I thought about some API call(s) to get the current CPU speed, something simple like the _WinAPI_GetCPUCoreCount() function to get the cores.

 

By the way, there's no need in your code to get the # of CPU's since _PDH_Init() does that as part of initialization, and stores the count in the global variable $_PDH_iCPUCount.

I used _WinAPI_GetCPUCoreCount() to have a plan b when for any reason _PDH_Init() has failed which was already reported.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I get the error : Error Calling PdhGetFormattedCounterValue for Handle:0x03EC1B88, Path [if passed]:0, Return:C0000BC6

But everything seems to work fine.

Great example and script. THanks for sharing :)

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

@PhoenixXL: I get the same error message but I cannot say what the problem is. Probably not a real issue for this usage.

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I get the error : Error Calling PdhGetFormattedCounterValue for Handle:0x03EC1B88, Path [if passed]:0, Return:C0000BC6

 

 

UEZ, etc:  My apologies, I didn't see that this common message was showing up.  I just ran it through SciTE however, and got the same thing.  The problem is that the first 'update' call for many performance counters (CPU usage counters included), will be invalid.  The reason is that the Performance Counters need a baseline reading from which to calculate measurements, and that isn't done until a call to PdhCollectQueryData.

UEZ, if you add this line right after a successful call to _PDH_GetCPUCounters(), it should probably stop that error from popping up for most users (it did for me):

_PDH_CollectQueryData($hPDHQuery)  ; establish baseline data

Sometimes, depending on the time between the call to get the baseline and the next call, there might be an error - but this is only for very small time intervals.  I don't see that being an issue for your code, as there is a lot of other code that runs between adding the CPU counters and reading the data for them.

Link to comment
Share on other sites

Very, very nice!

Should be easy to make it resizeable :D hehe

Edit: The seconds dial at the bottom is a nice touch.

Edited by Lakes

2015 - Still no flying cars, instead blankets with sleeves.

Link to comment
Share on other sites

UEZ >this one's for you.

Link to comment
Share on other sites

Thanks Ascend4nt but I'm missing the overall CPU usage. Is it easy to implement?

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Thanks Ascend4nt but I'm missing the overall CPU usage. Is it easy to implement?

Br,

UEZ

No problemo my friend.  The overall combined CPU usage is as easy as calling the 'documented' GetSystemTimes function.  I'm off to update the thread.. :)

Link to comment
Share on other sites

Update to v0.9.8.0 build 2013-06-20 beta!

Many thanks to Ascend4nt for shorter CPU usage code and czardas for mus++ and arranging "Für Elise".

To play the midi I used a different technique which let the music sometime play not in time.

If somebody knows a simple way to check whether any network traffic (bytes sent / received) is made, please let me know.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Hey UEZ I'm happy you decided to use this. :) I think the tune works nicely with the graphics. There are still several optimizations need doing to the mus++ interpreter. It's still in experimental phase, although I have solutions for most of the problems. When I have finished it will be much easier to implement than it is at present.

Link to comment
Share on other sites

You spend a lot of time to create mus++ and for this tool to arrange "Für Elise" - it would have been not fair to your efforts to use something else instead! 

AND I LIKE IT THIS WAY! ;)

Thx a lot.

 

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

What an awesome about section.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Updated to v0.9.9.0 build 2013-06-21 beta.

Added network traffic LED. When network traffic occurs LED to the right will change to green. Used Ascend4nt's >Network Statistics for IP, TCP, UDP, and ICMP traffic.

Many thx dude!

And added two more color schemas - mint and pink.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I forgot to adapt some parts (ini and context menu section) in the code after added the two color schemas.

If you use this clock I recommend to update it.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

UEZ,

this is a very cool tool - very well done! :thumbsup:

Maybe a bit off-topic: Can your method to set menu icons be used to set tray icons? I'm still looking for a way to set them across different OS platforms (and different themes [Aero, basic theme, without theme, etc.]) with a correct (transparent) background.

Edited by supersonic
Link to comment
Share on other sites

Well, it is not real transparency what you see. I draw the background according to the windows default background color which seems to be transparent otherwise the outline gets fuzzy or bg is black.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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

×
×
  • Create New...