T
tlviewer
hello,
If you run the Mainboard monitor, speedfan, here is
an ActivePython script to force automatic fan control.
        http://www.almico.com/speedfan.php
It's a great example of how clean the WinApi interface is
in ActivePython. The script sets focus to the checkbox of
interest and toggles the checkbox. AFAIK, speedfan will only
start without fan control, requiring the user to manually
check the checkbox to turn it on.
hope someone finds it useful,
tlviewer
#!/usr/bin/python
# author: (e-mail address removed)
# date: April 1, 2005
# description: turn on SpeedFan automatic fan speed
# keywords: speedfan readings
#import win32api as ap
import win32gui as wi
import win32ui as ui
import win32con as wc
# dialog class name
cl = "TJvXPCheckbox"
try:
    hWnd = wi.FindWindowEx( 0, 0, "TForm1", "SpeedFan 4.20")Â
    print hWndÂ
    hWnd = wi.FindWindowEx( hWnd, 0, "TPageControl", "") Â
    print hWnd
    hWnd = wi.FindWindowEx( hWnd, 0, "TTabSheet", "Readings")
    print hWnd
    hWnd = wi.FindWindowEx( hWnd, 0, cl, "Automatic fan speed")
   Â
    print hWnd
    res = wi.SetForegroundWindow(hWnd)
    res=wi.SendMessageTimeout(hWnd,wc.WM_LBUTTONDOWN,wc.MK_LBUTTON,0,2,75) Â
    res = wi.SendMessageTimeout( hWnd,wc.WM_LBUTTONUP, 0, 0, 2, 75 )Â
    print res
except:
    pass
#end code
If you run the Mainboard monitor, speedfan, here is
an ActivePython script to force automatic fan control.
        http://www.almico.com/speedfan.php
It's a great example of how clean the WinApi interface is
in ActivePython. The script sets focus to the checkbox of
interest and toggles the checkbox. AFAIK, speedfan will only
start without fan control, requiring the user to manually
check the checkbox to turn it on.
hope someone finds it useful,
tlviewer
#!/usr/bin/python
# author: (e-mail address removed)
# date: April 1, 2005
# description: turn on SpeedFan automatic fan speed
# keywords: speedfan readings
#import win32api as ap
import win32gui as wi
import win32ui as ui
import win32con as wc
# dialog class name
cl = "TJvXPCheckbox"
try:
    hWnd = wi.FindWindowEx( 0, 0, "TForm1", "SpeedFan 4.20")Â
    print hWndÂ
    hWnd = wi.FindWindowEx( hWnd, 0, "TPageControl", "") Â
    print hWnd
    hWnd = wi.FindWindowEx( hWnd, 0, "TTabSheet", "Readings")
    print hWnd
    hWnd = wi.FindWindowEx( hWnd, 0, cl, "Automatic fan speed")
   Â
    print hWnd
    res = wi.SetForegroundWindow(hWnd)
    res=wi.SendMessageTimeout(hWnd,wc.WM_LBUTTONDOWN,wc.MK_LBUTTON,0,2,75) Â
    res = wi.SendMessageTimeout( hWnd,wc.WM_LBUTTONUP, 0, 0, 2, 75 )Â
    print res
except:
    pass
#end code