Ascend4nt Posted June 15, 2013 Posted June 15, 2013 On 6/15/2013 at 8:23 AM, UEZ said: 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) My contributions: Reveal hidden contents Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)
UEZ Posted June 15, 2013 Author Posted June 15, 2013 (edited) @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 June 15, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Ascend4nt Posted June 15, 2013 Posted June 15, 2013 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. My contributions: Reveal hidden contents Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)
UEZ Posted June 16, 2013 Author Posted June 16, 2013 (edited) On 6/15/2013 at 10:43 PM, Ascend4nt said: 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. Quote 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 June 16, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
PhoenixXL Posted June 16, 2013 Posted June 16, 2013 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: Reveal hidden contents 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.
UEZ Posted June 16, 2013 Author Posted June 16, 2013 @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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Ascend4nt Posted June 17, 2013 Posted June 17, 2013 Quote 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. My contributions: Reveal hidden contents Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)
Lakes Posted June 17, 2013 Posted June 17, 2013 (edited) Very, very nice! Should be easy to make it resizeable hehe Edit: The seconds dial at the bottom is a nice touch. Edited June 17, 2013 by Lakes 2015 - Still no flying cars, instead blankets with sleeves.
Ascend4nt Posted June 18, 2013 Posted June 18, 2013 UEZ >this one's for you. My contributions: Reveal hidden contents Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)
UEZ Posted June 18, 2013 Author Posted June 18, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Ascend4nt Posted June 18, 2013 Posted June 18, 2013 On 6/18/2013 at 10:13 AM, UEZ said: 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.. My contributions: Reveal hidden contents Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)
UEZ Posted June 20, 2013 Author Posted June 20, 2013 (edited) 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 June 20, 2013 by UEZ czardas 1 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
czardas Posted June 20, 2013 Posted June 20, 2013 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. UEZ 1 operator64 ArrayWorkshop
UEZ Posted June 20, 2013 Author Posted June 20, 2013 (edited) 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 June 20, 2013 by UEZ czardas 1 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
guinness Posted June 20, 2013 Posted June 20, 2013 What an awesome about section. UDF List: Reveal hidden contents _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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
UEZ Posted June 21, 2013 Author Posted June 21, 2013 (edited) 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 June 21, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
UEZ Posted June 24, 2013 Author Posted June 24, 2013 (edited) 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 June 24, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
supersonic Posted June 24, 2013 Posted June 24, 2013 (edited) UEZ, this is a very cool tool - very well done! 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 June 24, 2013 by supersonic
UEZ Posted June 24, 2013 Author Posted June 24, 2013 (edited) 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 June 24, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
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