How can I switch the active window using Java?

388 Views Asked by At

Is there a Java library which facilitates good GUI automation tools under Windows? Specifically, something which can switch active windows like AutoHotKey can.

I tried SikuliX, but with the exception of the image recognition tools, the library doesn't work very well. For example, when I try to switch to OneNote with App.switchto("OneNote") or App.switchto("OneNote.exe"), it often doesn't work.

The error log indicates that SikiliX confuses OneNote with another process with a similar name.

ONENOTE.EXE
[log] App.focus:  [9148:ONENOTEM.EXE]

Is there a better way to switch between active windows using Java?

0

There are 0 best solutions below