AutoHotKey в Java

Question:

For the n-th time I have been using the AutoHotKey program so that when I press the "w" button, a certain sequence of keys is executed in the game (in other words, "macro"), the question is the following:

How do I implement something like this in Java? I looked at the java.awt.Robot class, made a simple application, but the problem is that in order to read keystrokes, you need to make the application window with the code active, but you just can't change it.

Has anyone solved this problem? If so, how. If not, where to dig?

Answer:

The solution is as follows:

We connect WindowsAPI and just manipulate scripts written in AutoHotKey

Scroll to Top
AllEscort