开发者

Sending keystrokes/mouse clicks to a Java program with Autohotkey

Im trying to send keystrokes and mouse movements to a Java program but once the applicaton has focus nothing is sent. It's as if the Java application takes focus of everything because Autohotkey stops responding. Everything works fine in a regular Windows app (e.g. Notepad).

I've tried using various send methods (Send, SendInput, and SendEvent) but nothing works. Does any开发者_如何学运维one have any suggestions?

The program in particular is ThinkOrSwim's ThinkDesktop.


I was able to get my script running with ThinkOrSwim by running the SciTE editor as Administrator [or running the compiled scripts as Administrator].

The TOS UI had some refresh issues but my scripts went through fine to do what I needed to do.


Some playing around I've discovered that TOS on Mac OSX can be controlled via scripting with Keyboard Maestro. It's a ugly, hacked solution, but it works. You can edit text boxes and click stuff if you know the X,Y position of elements.

Keyboard Maestro can be run via scripts (AppleScript, Python, etc.) so maybe you can build some elaborate rube goldberg.


I suggest you use Easy Macro Recorder

http://download.cnet.com/Easy-Macro-Recorder/3000-2094_4-10414139.html

Its a great tool to automate keystrokes and mouse movements. Hope this helps :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜