问题描述
当关注java应用程序时,AutoIt似乎停止工作。
AutoIt seems to stop working when focus is given to a java application.
对于此代码:
MouseMove(61, 121, 10);
WinActivate("Main @ paperMoney [build 1800.20]");
MsgBox(0, "got it", "got it");
结果是 - >鼠标移动,java应用程序获得焦点并显示消息
Results are --> Mouse moves, java application gets focus and message appears
对于此代码:
WinActivate("Main @ paperMoney [build 1800.20]");
MouseMove(61, 121, 10);
MsgBox(0, "got it", "got it");
结果是 - > java应用程序获得焦点,鼠标不移动并显示消息。
Results are --> java application gets focus, mouse DOES NOT move and message appears.
在java应用程序具有焦点后,我能做些什么来使鼠标和键盘命令工作?
Is there anything I can do to make the mouse and keyboard commands work after the java application has focus?
推荐答案
考虑到paperMoney的作用,它可能是故意抵制自动化。特别是当窗口被激活时,它将挂钩到低级鼠标事件并检查所有硬件鼠标移动与实际移动。使用它可以防止任何模拟鼠标移动。你可以在窗口中使用发送键入键吗?
Considering what paperMoney does, it is probably purposely resisting automation. Especially when the Window is activated, it will hook into low-level mouse events and check all hardware mouse movement with actual movement. Using that it will prevent any simulated mouse movement. Can you use Send to type keys in the Window?
这篇关于将AutoIt与java应用程序一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!