如何在我们的应用程序之外控制鼠标指针
我想用我的应用程序控制鼠标指针,并能够使用我的程序与其他程序交互, 例如,我希望我的应用程序能够单击另一个应用程序上的按钮,
我应该如何解决这个问题? (任何编程语言都可以,如果您有任何建议,请告诉我)
事后思考: 我想在 Windows 操作系统中执行此操作,并想测试我的 GUI,看看它是否可以在不同的场景中工作。 任何语言都适合我,因为这不是最终产品的一部分,但我更喜欢其中一种语言(Python、Java、C# 或 MATLAB)
谢谢
I want to control the mouse pointer with my application and be able to interact with other programs using my program,
For example I want my application to be able to click on a button on another application
How should I go about solving this problem?
(Any programming language would work, also if you have any suggestion please let me know)
Afterthoughts:
I want to do it in windows operating system and want to test my GUI to see if it works in different scenarios. Any language would work for me since this is not part of the final product but I prefer one of these languages (Python, Java, C# or MATLAB)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有很多方法可以做到这一点,并且您没有提及应用程序的任何细节(系统、目标等)。
如果您的目标是简单的自动化,我建议您在 Windows 上编写一个快速的 AutoIt 脚本。 http://www.autoitscript.com/autoit3/index.shtml
如果这是不是您要找的内容,请提供更多详细信息。
There are many ways of doing this, and you didn't mention any details of your application (system, target goal, etc...).
If your goal is menial automation, I'd recommend whipping together a quick AutoIt script on Windows. http://www.autoitscript.com/autoit3/index.shtml
If this isn't what you're looking for, please give more details.
好吧,这个确实是针对操作系统和窗口的。 但您要查找的短语是“鼠标抓取”。
正如 @Mitch 所建议的,除非你有一个真正的充分理由——比如 GUI 测试应用程序? - 那么抓住鼠标并以这种方式弄乱它是非常的糟糕形式。
Okay, this one is really operating system and windowing specific. But the phrase you're looking for is "mouse grabbing".
As @Mitch suggests, unless you've got a really good reason — like maybe a GUI testing app? — then grabbing the mouse and messing with it in that way is very bad form.