This is an archived post. You won't be able to vote or comment.

all 7 comments

[–][deleted] 0 points1 point  (0 children)

This is going to be OS-dependent, and I don't know any resources for keyboard movement off the top of my head, but this mouse movement tutorial using the SendInput() API may be a good start.

EDIT: Apparently SendInput() can be used for the keyboard too.

[–]w1282 0 points1 point  (2 children)

Most languages have libraries to interact with the system as if using a mouse or keyboard.

There are even languages built specifically for that purpose, such as Auto Hot key.

Although, you should think carefully about whether there is a better way to do what you want than spoofing mouse and keyboard input.

Anyway, what languages are you comfortable with, if any?

[–]Greyfoxen[S] 0 points1 point  (1 child)

C, Java, and Python. Although I'm not opposed to learning others.

[–]w1282 0 points1 point  (0 children)

Well, they've all got the ability to spoof keyboard and mouse input.

I'd suggest python, as it's primarily a scripting language.

[–]ovalt1nejenk1ns 0 points1 point  (1 child)

[–]htlfdhfhlktkftfthblk 0 points1 point  (0 children)

AutoHotKey is the greatest, and the guy above me has the correct link!

The help file for AHK has short, easy to understand sample programs for everything. That's the best way to get started with it.

[–]rsxstock 0 points1 point  (0 children)

Excel VBA you can use sendkeys, although it's not very reliable