0

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}")
user4573
  • 21
  • 1
  • 4

1 Answers1

1

Check: Get screenshot on Windows with Python? or Simulate the print screen key in python . These links should help take screenshots with the "PrtSc" button

Rich Kirk
  • 28
  • 6