I'm trying to grab a screen shot of all monitors in Windows by pressing the "PRTSC" button. My code needs to be as lean as possible and this was the best solution I've came up with, however, it's not working in python 3 which is a requirement. I have no issues sending other keystrokes. Any ideas?
import win32com.client
class SendKeys:
def __init__ (self):
self.win = win32com.client.Dispatch("WScript.Shell")
def send (self, data):
self.win.SendKeys(data, 0)
sk = SendKeys()
sk.send("{PrtSc}")