-1

How would I get python to type for me. The only thing I've found was on SendKeys but I can't find the version for python 3.5. Is there any built in module I can use to get python to type for me?

jjguidry
  • 43
  • 1
  • 1
  • 9
  • What do you mean? How will it get the input and in what sense will it be "typing"? – Two-Bit Alchemist Apr 08 '16 at 22:47
  • I want to run the program, wait 2 or 3 seconds to get to the textbox i want to type in, and then it types whatever for me. Basically simulating a key stroke or multiple key strokes. – jjguidry Apr 08 '16 at 22:48
  • Are you typing in the textbox or is something being automatically entered? I don't understand what you're describing. It's simulating keystrokes but which keys and how does it know? – Two-Bit Alchemist Apr 08 '16 at 23:02
  • I want it to simulate a key press. Where that be typing in a text box or anything else that involves pressing a button on your keyboard – jjguidry Apr 08 '16 at 23:19
  • OK. You want Python to type 'k'. How does it know to type 'k'? I don't know how else to ask this question. The program cannot read your mind to know what to type for you. Where does it get its information about what keypresses to simulate? – Two-Bit Alchemist Apr 09 '16 at 02:37
  • Did my answer solve your issue? If so, please mark it as correct. – kirkpatt Apr 14 '16 at 16:25
  • It looks like what i want, but i dont even know where to start to get the package. If you provide me with a link to the download or some sort of instructions, then i will mark it as an answer. – jjguidry Apr 14 '16 at 20:37

1 Answers1

1

The win32api, assuming windows, has what you need in the keybd_event() function. Documentation here. As for built-ins, not aware of anything like that. Also, see this page.

Community
  • 1
  • 1
kirkpatt
  • 625
  • 5
  • 21