Enforcer

CPU,RAM,TIME Widgets

4 posts in this topic

Hello, just sharing my good old

CPU, RAM, TIME widget.

111.thumb.png.f360a8dbe43d90ab3d189c6c82

CONTY.rar

3 people like this

[RU] Zone

Share this post


Link to post
Share on other sites



I might suggest you remove the 75+ lines that are commented out. Makes the code kludgy and difficult to decipher.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
"C:\Users\Owner\Downloads\CONTY\Conty-ram.au3"(164,31) : warning: $wmp: possibly used before declaration.
$vsego = Round(_wmpvalue( $wmp,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Owner\Downloads\CONTY\Conty-ram.au3"(164,31) : error: $wmp: undeclared global variable.
$vsego = Round(_wmpvalue( $wmp,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Owner\Downloads\CONTY\Conty-ram.au3"(164,47) : error: _wmpvalue(): undefined function.
$vsego = Round(_wmpvalue( $wmp, "getduration" )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Owner\Downloads\CONTY\Conty-ram.au3 - 2 error(s), 1 warning(s)
!>23:45:16 AU3Check ended. Press F4 to jump to next error.rc:2

=(

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Kudos on creating widgets! With Win10 I lost all my good ones include moon phase and earthquake monitor. :(

I would love to replace these.

Fortunately, thanks to @UEZ , I have a nice time piece that also monitors several system functions as well!

 

Edited by coffeeturtle

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

  • Similar Content

    • argumentum
      By argumentum
      I was looking for something like this, in the forum and my HDD. Bad hair day. Anyway,
      Here is the code
      If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox(262144, @ScriptName, "...please run this example from editor.", 3) #include <Date.au3>; for _EstimatedTime() #include <InetConstants.au3>; for _EstimatedTime_Example_2() ;=============================================================================== ; ; Function Name: _EstimatedTime() ; Description: calculate estimated time of completion ; Parameter(s): $a - holds the data ; $iCurrentCount - Current count ; $iTotalCount - Total count ; Requirement(s): #include <Date.au3> ; Return Value(s): false on incomplete data for assessment ; Author(s): argumentum ; Note(s): read the comments ; ;=============================================================================== Func _EstimatedTime(ByRef $a, $iCurrentCount = "", $iTotalCount = "") If $iCurrentCount & $iTotalCount = "" Then ; initialize $a = "" Dim $a[12] $a[5] = TimerInit() ; handle for TimerDiff() $a[0] = "00:00:00" $a[1] = "00:00:00" $a[2] = _NowCalc() ; starting date and time $a[3] = "" $a[4] = "0" Else If $iTotalCount = 0 Then Return False If $iCurrentCount > $iTotalCount Then $iCurrentCount = $iTotalCount _TicksToTime(Int(TimerDiff($a[5])), $a[6], $a[7], $a[8]) _TicksToTime(Int((TimerDiff($a[5]) / $iCurrentCount) * ($iTotalCount - $iCurrentCount)), $a[9], $a[10], $a[11]) $a[0] = StringFormat("%02i:%02i:%02i", $a[6], $a[7], $a[8]) ; elapsed time $a[1] = StringFormat("%02i:%02i:%02i", $a[9], $a[10], $a[11]) ; estimated total time $a[3] = _DateAdd("s", Int((TimerDiff($a[5]) / $iCurrentCount) * ($iTotalCount) / 1000), $a[2]) ; estimated date and time of completion $a[4] = Int($iCurrentCount / $iTotalCount * 100) ; percentage done EndIf Return True EndFunc ;==>_EstimatedTime _EstimatedTime_Example_1() Func _EstimatedTime_Example_1() ConsoleWrite(@CRLF & "+ Example 1" & @CRLF) ConsoleWrite("elapsed " & @TAB & "estimated" & @TAB & "starting date time " & @TAB & "estimated date time" & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) Local $n, $sec = @SEC, $aETTF ; "Estimated Time To Finish" data holder _EstimatedTime($aETTF) ; called with just the data holder to init. it For $n = 1234 To 1 Step -1 Sleep(1) If $sec <> @SEC Then $sec = @SEC _EstimatedTime($aETTF, 1234 - $n, 1234) ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) EndIf Next _EstimatedTime($aETTF, 1234 - $n, 1234) ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) EndFunc ;==>_EstimatedTime_Example_1 _EstimatedTime_Example_2() Func _EstimatedTime_Example_2() ConsoleWrite(@CRLF & "+ Example 2" & @CRLF) ConsoleWrite("elapsed " & @TAB & "estimated" & @TAB & "starting date time " & @TAB & "estimated date time" & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) Local $aETTF ; "Estimated Time To Finish" data holder _EstimatedTime($aETTF) ; called with just the data holder to init. it ; Save the downloaded file to the temporary folder. Local $sFilePath = @MyDocumentsDir & "\tempFile.bin" Local $sLink = "http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Platform/PortableApps.com_Platform_Setup_12.0.5.paf.exe?r=http%3A%2F%2Fsourceforge.net%2Fdirectory%2Fbusiness-enterprise%2Fos%3Awindows%2Ffreshness%3Arecently-updated%2F&ts=1442615522&use_mirror=iweb" ; Download the file in the background with the selected option of 'force a reload from the remote site.' Local $hDownload = InetGet($sLink, $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. Do Sleep(1000) If _EstimatedTime($aETTF, InetGetInfo($hDownload, $INET_DOWNLOADREAD), InetGetInfo($hDownload, $INET_DOWNLOADSIZE)) Then ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) Else ConsoleWrite(". ") EndIf Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) ; Retrieve the number of total bytes received and the filesize. Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD) Local $iFileSize = FileGetSize($sFilePath) ; Close the handle returned by InetGet. InetClose($hDownload) _EstimatedTime($aETTF, $iBytesSize, $iFileSize) ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) ; Display details about the total number of bytes read and the filesize. ConsoleWrite("The total download size: " & $iBytesSize & " - The total filesize: " & $iFileSize & @CRLF) ; Delete the file. FileDelete($sFilePath) EndFunc ;==>_EstimatedTime_Example_2  
    • IamKJ
      By IamKJ
      I am trying to allow the GUI to gather info as to when to execute a function.  I am having trouble doing this.  So far this is what I have.
       
      ;Timer Func timer () If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"Timer","Please format your answer in 00:00:00:000") Select Case $iMsgBoxAnswer = 6 ;Yes Global $infotime = InputBox ('Time', 'What time to execute?') Do $rawtimer = ToolTip(@Hour & ':' & @Min & ':' & @Sec & ':' & _MSec()) until $rawtimer = $infotime if $rawtimer = $infotime Then msgbox (0,'Worked','Worked') Else EndIf Case $iMsgBoxAnswer = 7 ;No Exit EndSelect EndFunc Func _MSec() Local $stSystemTime = DllStructCreate('ushort;ushort;ushort;ushort;ushort;ushort;ushort;ushort') DllCall('kernel32.dll', 'none', 'GetSystemTime', 'ptr', DllStructGetPtr($stSystemTime)) $sMilliSeconds = StringFormat('%03d', DllStructGetData($stSystemTime, 8)) $stSystemTime = 0 Return $sMilliSeconds EndFunc I have also tried _GUIToolTip_GetText in order to read the tooltip until the time specified, but it still doesn't work.  Any help would be great.
    • SaeidN
      By SaeidN
      Hi,
      I searched a lot here but didn't find what I want. Most of them were countdown and other stuff and back to 2004.
      I just want a normal timer that when a button on gui is pressed, it starts from 00:00:00 and goes up.
    • Altor
      By Altor
      Hi all.
      I need execute a function at a certain time for example at 00:00 and 12:00.
      My initial idea is use a infinite loop that take the time system and compare with the specified time.
      I do not know if this is the right way to do it. I think this must have occupied the processor for a long time.
      I would appreciate if  comment on whether this is the system that you would use to do this kind of task
      or if you know  any UDF to perform this function.
      Thanks to all
    • xCobra15x
      By xCobra15x
      Hi all, 
      I am looking for a quick tip on why my autoit script crashes when I run a timer. Currently I have this code:
            ....(more code above this)....
                Case $button2
                            function1()
                 Case $butTimer
                            _Timer_setTimer($hGUI, 3200, "_timedout")
              ......
               Func _timedout()
                             Msgbox(0, "Timed out", "Time is up!")
                Endfunc
      When the button is pressed, my timer starts, correct? It doesnt seem to matter if I have it on button activation or not, after the time goes by for a bit, it crashes.
      Seemingly when the time is up, my script crashes. 
      Thanks for your help!