For validation purpose, i need to take screenshot of remote RDP Windows machine and put it on FTP or recieve it directly to my machine. Is where any solution to invoke such task by demand? Preferably, i want to call some function from my Python code. Thanks for any thoughts.
Asked
Active
Viewed 1,213 times
1 Answers
0
I think this is duplicate question of Get screenshot on Windows with Python?
The most accepted answer from Sepero was to use the wxPython library. He posted this:
import wx
wx.App() # Need to create an App instance before doing anything
screen = wx.ScreenDC()
size = screen.GetSize()
bmp = wx.EmptyBitmap(size[0], size[1])
mem = wx.MemoryDC(bmp)
mem.Blit(0, 0, size[0], size[1], screen, 0, 0)
del mem # Release bitmap
bmp.SaveFile('screenshot.png', wx.BITMAP_TYPE_PNG)
As an aside, I'm not sure of the context here but you'll probably want to first set the focus on the desired RDP window before taking the screenshot.

Jesse Calvillo
- 11
- 3
-
This is good solution, if i was sitting on RDP itself or open it on my machine, but i really interesting in getting screenshot without actually opening RDP on my side. Is where any API for doing so? My Machine -remote call for screenshot-> RDP(making screenshot) -> My Machine(grabbing from FTP, or directly from API) – Chaika Bogdan Feb 09 '18 at 08:46