Jump to content

Search the Community

Showing results for tags 'fan speed'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi! How to display the CPU fan speed according to this example: #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 ("Fan speed", 10, 40, 100, 20) $CPUTemp = GUICtrlCreateLabel("", 130, 10, 50, 20) $CPUFan = GUICtrlCreateLabel("", 130, 40, 50, 20) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch $colItems = $objWMIService.ExecQuery("SELECT * FROM Sensor", "WQL",$wbemFlagReturnImmediately + $wbemFlagForwardOnly) For $objItem in $colItems 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 = 'Fan' and StringInStr($objItem.Parent, 'mainboard') Then If StringInStr($objItem.Name , "Fan #1") Then _GuiCtrlSetData($CPUFan, $objItem.Value & " RPM") EndIf EndIf Next WEnd Func _GUICtrlSetData($iCtrlID, $sData) If GUICtrlRead($iCtrlID, 1) <> $sData Then GUICtrlSetData($iCtrlID, $sData) EndFunc ;==>_GUICtrlSetData Sensor "Fan" does not work. Or I'm doing something wrong?
×
×
  • Create New...