发送击键到另一个应用程序C# [英] Send key strokes to another application C#
问题描述
我需要自动化 FileMon.exe的带过滤器来启动,节省出来的记录它会产生,然后退出。
I need to automate FileMon.exe to startup with filters, save out the log it generates, and then exit.
我的解决方案是编写一个应用程序帮助,会做这一切。已经工作与指定的过滤器启动和终止进程,但我仍然需要它来保存日志。你是否认为这将是愚蠢的发送应用程序按键保存日志?比如我会派一个Alt + F,Alt + S键,输入文件路径,回车。
My solution has been to write an assist application that will do all of this. Which has worked on starting up with specified filters and killing the process, but I still need it to save the log. Do you think it would be silly to send the application keystrokes to save the log? For instance I would send an Alt+F, Alt+S, type filepath, Enter.
你怎么能发送键击类似上面到在C#中运行的另一个进程?
How can you send keystrokes like above to another process that is running in C#?
推荐答案
感谢所有的答案和帮助的家伙......我竟然会写,并使用Win32调用perl脚本:: GuiTest。
Thanks for all the answers and help guys... I'm actually going to write and invoke a perl script using Win32::GuiTest.
这篇关于发送击键到另一个应用程序C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!