2024-05-13 11:14:11 发布
网友
为了验证目的,我需要截取远程RDP Windows机器的屏幕截图,并将其放在FTP上或直接接收到我的计算机上。 在哪里可以根据需要调用这种任务?最好是从Python代码中调用一些函数。谢谢你的任何想法。在
我想这是一个重复的问题Get screenshot on Windows with Python?
Sepero最接受的回答是使用wxPython库。他贴了这个:
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)
顺便说一句,我不确定这里的上下文,但您可能想在截图之前先set the focus on the desired RDP window。在
我想这是一个重复的问题Get screenshot on Windows with Python?
Sepero最接受的回答是使用wxPython库。他贴了这个:
顺便说一句,我不确定这里的上下文,但您可能想在截图之前先set the focus on the desired RDP window。在
相关问题 更多 >
编程相关推荐