支持在 .net 应用程序中记录事件
我需要帮助了解如何在 .net 应用程序中实现对记录用户事件的支持,就像 Office 中的宏一样。因此,如果用户记录了他的操作,那么他执行的所有操作都将被重新执行。
其他一些应用程序(例如 Notepadd++)也具有此功能,我不知道这在 .net 中是否可行,
谢谢
编辑 我在代码项目 使用 Win32 Journal Hooks 编写宏记录器/播放器 中看到了这篇文章挂钩到鼠标和键盘,在 .net 中如何做到这一点
I need help on how to implement support for recording user events in a .net application just like macro in office. SO if the user records his actions, all the things he performed will be re executed.
Some other apps like Notepadd++ has this feature too, i don't know if this is possible in .net
thanks
EDIT
I saw this article in code project Writing a Macro Recorder/Player using Win32 Journal Hooks that does hooking to mouse and keybord, how does one do that in .net
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经在我的一个应用程序中实现了这一点。
我在我的架构中使用了命令模式。应用程序中的录制按钮设置 RecordingFlag。
当 RecordingFlag 为 true 时,存储所有执行的命令(首先阅读命令模式以了解这一点),直到 RecordingFlag 为 false(用户再次按下录制按钮)。
运行录制的宏只是迭代存储的命令并按顺序执行它们。
I've implemented that in one of my applications.
I used a command pattern in my architecture. The record button in the application sets a RecordingFlag.
While the RecordingFlag is true, store all the executed commands (read Command pattern first to understand this) until RecordingFlag is false (user push record button again).
Running the recorded macro is just iterate the stored commands and execute them in order.