问题
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.
Is there any tool available for that?
Please suggest me an easy and nice way to do it?
回答1:
I have used AutoIT v3 for a long time and highly recommend it:
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:
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.
回答2:
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.
回答3:
If you're trying to write your own program to do this:
SendInput (newer) or mouse_event and keybd_event (simpler)
If you're looking for an existing program, then superuser is a better place to ask than stackoverflow.
回答4:
Check out white on CodePlex
回答5:
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:
http://www.autohotkey.com/
来源:https://stackoverflow.com/questions/3468261/emulate-user-activity