Re: [python-win32] Screenshot a given window instead of the whole desktop

2017-04-30 Thread Michael C
I solved that problem already, i sould have told everyone here, sorry On Sun, Apr 30, 2017 at 11:13 PM Tim Roberts wrote: > On Apr 28, 2017, at 5:40 PM, Michael C > wrote: > > > I have my own code that samples pixel colour, > https://pastebin.com/4EMd765h > > and now I am trying to add the fe

Re: [python-win32] Screenshot a given window instead of the whole desktop

2017-04-30 Thread Tim Roberts
On Apr 28, 2017, at 5:40 PM, Michael C mailto:mysecretrobotfact...@gmail.com>> wrote: I have my own code that samples pixel colour, https://pastebin.com/4EMd765h and now I am trying to add the feature of saving the Device Context to a .bmp file, so I found this code https://books.google.ca/bo

Re: [python-win32] win32gui.SetPixel error

2017-04-30 Thread Michael C
Oh I found out my code accidentally give negative values to the function. :( Thanks all! On Sat, Apr 29, 2017 at 1:10 PM, Michael C wrote: > fill the radar scan points with red.py", line 66, in > win32gui.SetPixel(desktop_dc, x,y, rgb ) > pywintypes.error: (0, 'SetPixel', 'No error message

[python-win32] Screenshot a given window instead of the whole desktop

2017-04-30 Thread Michael C
Hi all: I have my own code that samples pixel colour, https://pastebin.com/4EMd765h and now I am trying to add the feature of saving the Device Context to a .bmp file, so I found this code https://books.google.ca/books?id=9MS9BQAAQBAJ however there is one problem: The book example screenshots

[python-win32] win32gui.SetPixel error

2017-04-30 Thread Michael C
fill the radar scan points with red.py", line 66, in win32gui.SetPixel(desktop_dc, x,y, rgb ) pywintypes.error: (0, 'SetPixel', 'No error message is available') Hi all: I am trying to paint a few pixels in the color of red. However, when I ran this win32gui.SetPixel(desktop_dc, x,y