Hi Wayfarer, the issue is not about the app is hanging. It says "Not responding" for a while, and return to normal when resource are available or it is not working that hard.
The issue is, the bitmap checksum changes when the app greys out. My code waits for a region of bitmap to change, i.e., "Processing...." is changed to "Completed". It still reads "Processing...", but the color is different.
Here is my function:
; $x, $y, $w, $h: region to check; $prepareRate: amount of milliseconds to skip on checking; $waitRate: amount of milliseconds between checks
Func _WaitForImageChanged($x, $y, $w, $h, $prepareRate, $waitRate)
Sleep($prepareRate)
Local $checksum1 = PixelChecksum($x, $y, $w, $h)
Local $checksum2 = $checksum1
while $checksum1 = $checksum2
$checksum2 = PixelChecksum($x, $y, $w, $h)
Sleep($waitRate)
WEnd
EndFunc