here is my script
when script is running I want to be able to click ESC to pause it and ESC to continue it running. tried 10 different ways but still was not able to get it to work, can someone help?
CODE:
br := 255 ; brightness, in the range of 0 - 255, where 128 is normal
sleep, 2000 ; Start sleep 2s
VarSetCapacity(gr, 5123)
Loop {
Loop, 256
{
If (nValue:=(br+128)(A_Index-1))>65535
nValue:=65535
NumPut(nValue, gr, 2(A_Index-1), "Ushort")
NumPut(nValue, gr, 512+2(A_Index-1), "Ushort")
NumPut(nValue, gr, 1024+2*(A_Index-1), "Ushort")
}
hDC := DllCall("GetDC", "Uint", 0)
DllCall("SetDeviceGammaRamp", "Uint", hDC, "Uint", &gr)
DllCall("ReleaseDC", "Uint", 0, "Uint", hDC)
sleep, 2000 ; 2s internal between brighness fix, change it for faster refresh
}
return
when script is running I want to be able to click ESC to pause it and ESC to continue it running. tried 10 different ways but still was not able to get it to work, can someone help?
Statistics: Posted by zemaitis — Today, 05:34