Simulate the print screen key in python

牧云@^-^@ 提交于 2019-12-10 20:08:16

问题


i search lot in Google but i did not got anything . can we simulate the print screen key in python ? if yes then how to simulate the print screen key in python?


回答1:


To take a screen shot the comments you've been given will work:

Get screenshot on Windows with Python? python auto save printscreen

To simulate the print screen key you may use keystroke automation libraries, two of which I can attest work for this:

1: pywinauto

which uses SendKeys to simulate keystrokes (or see reference here).

2: Sikuli_cpython

which uses the standalone sikuli API to handle keystrokes and much much more. Here is then the list of keys you can simulate by passing the respective unicode char to the sikuli method type()



来源:https://stackoverflow.com/questions/23106948/simulate-the-print-screen-key-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!