Open GoogleCodeExporter opened 9 years ago
Yes, I've come across this same issue when using
pywinauto.findwindows.find_windows with a title regexp (title_re). I'm not sure
if returning an empty string in case of a timeout is the best way to fix this,
though.
Original comment by xof...@gmail.com
on 23 Apr 2012 at 2:12
I agree with empty string not being preferable. Why can't it just raise an
exception? If some kind of a return code is retrievable from
SendMessageTimeout, imo it should be carried as part of the exception so it's
possible to determine what happened afterwards (and possibly retry).
Original comment by seppo.yl...@gmail.com
on 16 Jan 2013 at 2:40
FWIW re-reading the code: return value of win32functions.SendMessageTimeout is
not checked. If it is zero, the call failed or timed out as per
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644952%28v=vs.85%29.a
spx. If this happens, you get weird lengths. Is there any maintainer for this
project so we can get this finally fixed or do we need a fork? Docs also
suggest calling GetLastError. Imo the function should see if retval is 0, get
last error, translate to something sensible, raise exception.
Original comment by seppo.yl...@gmail.com
on 3 Feb 2015 at 5:38
Original issue reported on code.google.com by
cbwhiz@gmail.com
on 8 Feb 2012 at 7:42