@just me I opened this thread exactly because I wanted (though not necessarily needed) to use an infinite timeout.
I could ask the same question about WinWaitActive (or WinWait, or ...) - why should the default be infinite wait, not 30 seconds or something like that?
The default value 5000ms for SendMessage seems like an arbitrary value from AHK v1 times, because Win32 SendMessage by default has an infinite wait. I would have expected AHK to be the same, but I guess because AHK is single-threaded then this is necessary to prevent the script from freezing? In that case perhaps SendMessageCallback should've been the default instead...

The default value 5000ms for SendMessage seems like an arbitrary value from AHK v1 times, because Win32 SendMessage by default has an infinite wait. I would have expected AHK to be the same, but I guess because AHK is single-threaded then this is necessary to prevent the script from freezing? In that case perhaps SendMessageCallback should've been the default instead...
Statistics: Posted by Descolada — Today, 11:07