Jump to content

Simulate input/Keyboard: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 442:
 
=={{header|Python}}==
{{works with|Python|2.7+}}
{{works with|Python|3.5+}}
{{libheader|AutoPy}}
 
<lang Python>import autopy
autopy.key.type_string("Hello, world!") # Prints out "Hello, world!" as quickly as OS will allow.
autopy.key.type_string("Hello, world!", wpm=60) # Prints out "Hello, world!" at 60 WPM.
autopy.key.tap(autopy.key.Code.RETURN)
autopy.key.tap(autopy.key.Code.F1)
autopy.key.tap(autopy.key.Code.LEFT_ARROW)
</lang>
 
{{works with|Python|2.5+}}
{{works with|Python|3.1+}}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.