Jump to content

Emiel Wieldraaijer

Active Members
  • Posts

    717
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    Emiel Wieldraaijer got a reaction from GoogleGonnaSaveUs in How to disable (grey out) a button   
    @Steph

    GuiCtrlSetState (ControlID, $GUI_DISABLE)

    Emiel
  2. Like
    Emiel Wieldraaijer got a reaction from Xandy in hardware information   
    Download : http://openhardwaremonitor.org/files/openhardwaremonitor-v0.5.1-beta.zip

    OpenHardwareMonitor.exe must be started in order to retrieve the information, it's also possible to retrieve the information through the openhardwaremonitorlib.dll but i don't know how



    #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> If not ProcessExists("OpenHardwareMonitor.exe") Then Msgbox (16, "Error", "Please start OpenHardwareMonitor.exe") Exit EndIf $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $strComputer = "." $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\OpenHardwareMonitor") GUICreate ("CPU", 200,200) GUICtrlCreateLabel ("Temperature", 10, 10, 100,20) GUICtrlCreateLabel ("Load", 10, 40, 100,20) GUICtrlCreateLabel ("Power", 10, 70, 100,20) $CPUTemp = GUICtrlCreateLabel("", 130, 10, 50, 20, $SS_RIGHT) $CPULoad = GUICtrlCreateLabel("", 130, 40, 50, 20, $SS_RIGHT) $CPUPower = GUICtrlCreateLabel("", 130, 70, 50, 20, $SS_RIGHT) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch $colItems = $objWMIService.ExecQuery("SELECT * FROM Sensor", "WQL",$wbemFlagReturnImmediately + $wbemFlagForwardOnly) $Output="" $Power="" $Load="" For $objItem in $colItems if $objItem.SensorType = 'Power' and StringInStr($objItem.Parent, 'cpu') Then If StringInStr($objItem.Name , "Package") Then _GuiCtrlSetData($CPUPower, Round($objItem.Value,1) & " W") EndIf EndIf if $objItem.SensorType = 'Temperature' and StringInStr($objItem.Parent, 'cpu') Then If StringInStr($objItem.Name , "Package") Then _GuiCtrlSetData($CPUTemp, $objItem.Value & " °C") EndIf EndIf if $objItem.SensorType = 'Load' and StringInStr($objItem.Parent, 'cpu') Then If StringInStr($objItem.Name , "Total") Then _GuiCtrlSetData($CPULoad, Round($objItem.Value,1) & " %") EndIf EndIf Next WEnd Func _GUICtrlSetData($iCtrlID, $sData) If GUICtrlRead($iCtrlID, 1) <> $sData Then GUICtrlSetData($iCtrlID, $sData) EndFunc ;==>_GUICtrlSetData
  3. Like
    Emiel Wieldraaijer got a reaction from EmilyLove in Malwarebytes actively believes AutoIt is malware   
    hahahaha

    'Malwarebytes' i thought is was Malware..

    pfff .. don't use malwarebytes anymore.. problem solved
  4. Like
    Emiel Wieldraaijer got a reaction from bdr529 in Create PDF from your application   
    @bdr529
    Perfect
  5. Like
    Emiel Wieldraaijer reacted to ripdad in _WMI_GetATAPISmartData v1.01   
    Description <grin>

    After diving into S.M.A.R.T from a previous thread... hmm, might as well take a stab at it.

    One thing I did find after testing - The Drive Temperature is fairly accurate!

    Then all I had to find out was how to calculate POH.

    And, it dawned on me that it turns over every 1000... or is it 200, hmm. (It's 256)
    Anyway it starts back at 1 and adds the total to another column.

    So, I figured out (if my math was correct) that my hard drive's life is about half over. (sob)

    There are about 20 known programs out there in cyberspace. I tested about half of them.

    Almost none of those would show what I really wanted to know.
    1. How many hours was on the HD.
    2. What is the HD life expectancy.

    Well, I found out both those answers after I made this script.

    Let me know if any problems. I'll see what I can do about it.

    Download Version 1.01
    _WMI_GetATAPISmartData_v1.01.au3

    Updated: November 26, 2012
    1) changed some logic.
    2) added more error handling.
    3) added two additional ways to detect SSD's.
×
×
  • Create New...