This script displays the cpu usage numerically at the start button.
I am trying to personalize it (without success), in way that it will show numbers in white when the cpu usage is 1-33, orange when usage is 34-66 and red when 67-100.
Please guide/advise
Thanks.
#Persistent SetTimer, CheckCPULoad, 1000 return CheckCPULoad: SetFormat, float, 02 ControlSetText, Button1, % " " GetCPULoad() " %", ahk_class Shell_TrayWnd return GetCPULoad() { Global SetBatchLines, -1 IdleTime0 = %IdleTime% ; Save previous values Tick0 = %Tick% DllCall("kernel32.dll\GetSystemTimes", "uint",&IdleTicks, "uint",0, "uint",0) IdleTime := *(&IdleTicks) Loop 7 ; Ticks when Windows was idle IdleTime += *( &IdleTicks + A_Index ) << ( 8 * A_Index ) Tick := A_TickCount ; Ticks all together load := 100 - 0.01*(IdleTime - IdleTime0)/(Tick - Tick0) Return, load }