I'm trying to read the text of desktop icons using win32gui (I must use win32 because I also need to get the positions of the icons and they should match the text).
I used the code in here: Use Python to extract ListView items from another application and it returned a list with empty strings. I tried to check return codes and other values and they all make sense.
If the control is in the same process as your code, it should work. If it's in a different process (as "another application" suggests), then this doesn't work (or at least it shouldn't). Check the error codes, you should get something along the lines of "permission denied".
But the desktop is in a different process and I got no error codes!
To get the handle of the desktop window I used the get_desktop()
function that I posted in the solution section in here: How to get desktop item count in python?
Any ideas? Thanks!