문제

Is there a way to send keystrokes to 1 single process/program?

By doing so you should be able to send keystrokes only to this single process/program(while it is minimized) so the keystrokes aren't recognized by the other programs.

ps. this would be used for bots in certain games

도움이 되었습니까?

해결책

This is OS-specific; on Unix systems, you'd use the XTEST extension, and on Windows, you'd post to the program's event queue. The Robot class might be of some use to you, though it has limitations. Anything more involved will require using the OS's native API.

다른 팁

In java it's not possible to get keystrokes if the program scree is not visible.

You can do this in .net (c# or VB).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top