windows 模拟用户活动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3468261/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:01:32  来源:igfitidea点击:

Emulate User Activity

windowsemulation

提问by AutoMEta

I want to emulate user activity in Windows machine like left mouse click and further more I would like to perform a pre-defined steps repeatability.

我想模拟 Windows 机器中的用户活动,例如鼠标左键单击,而且我想执行预定义的步骤可重复性。

Is there any tool available for that?

有没有可用的工具?

Please suggest me an easy and nice way to do it?

请建议我一个简单而好的方法来做到这一点?

回答by vdoogs

I have used AutoIT v3 for a long time and highly recommend it:

我已经使用 AutoIT v3 很长时间了,强烈推荐它:

http://www.autoitscript.com/autoit3/index.shtml

http://www.autoitscript.com/autoit3/index.shtml

Recently I've been using Sikuli, and it seems to be a bit faster than AutoIT and is also definitely worth a try:

最近一直在用Sikuli,感觉比AutoIT快一点,也绝对值得一试:

http://groups.csail.mit.edu/uid/sikuli/

http://groups.csail.mit.edu/uid/sikuli/

Sikuli is based on taking screenshots to define the areas you want to click and seems to have much less of a learning curve, so if you aren't a programmer or prefer not to code that is your best bet. AutoIT is primarily a scripting language, so you are essentially scripting user actions through code.

Sikuli 基于截取屏幕截图来定义您想要单击的区域,并且学习曲线似乎要少得多,因此如果您不是程序员或不想编写代码,那么这是您的最佳选择。AutoIT 主要是一种脚本语言,因此您本质上是通过代码编写用户操作的脚本。

回答by karlphillip

If you want it to be nice, you got to do it yourself:

如果你想让它漂亮,你必须自己做:

Getting image contents of obstructed window

获取受阻窗口的图像内容

There's a lot of materials out there that shows how to simulate mouse events using the Windows API.

有很多资料展示了如何使用 Windows API 模拟鼠标事件。

回答by Ben Voigt

If you're trying to write your own program to do this:

如果您正在尝试编写自己的程序来执行此操作:

SendInput(newer)or mouse_eventand keybd_event(simpler)

SendInput(较新)mouse_eventkeybd_event(更简单)

If you're looking for an existing program, then superuser is a better place to ask than stackoverflow.

如果你正在寻找一个现有的程序,那么超级用户是一个比 stackoverflow 更好的地方。

回答by Josh Stodola

Check out whiteon CodePlex

在 CodePlex 上查看白色

回答by Android Eve

AutoHotkey is the tool you are looking for. It emulates user activity in Windows and more... It is open source and has a wonderful community support:

AutoHotkey 是您正在寻找的工具。它模拟 Windows 中的用户活动等等......它是开源的,并有很好的社区支持:

http://www.autohotkey.com/

http://www.autohotkey.com/