[英]Need help in finding name of specific thing I'm trying to do
I think it's possible to somehow hook with the windows environment (specifically explorer.exe) and trigger specific things, for example launching control panel and using it as if I had mouse (meaning I'm clicking the interface from the code). 我认为可以以某种方式挂接到Windows环境(特别是explorer.exe)并触发特定的事情,例如启动控制面板并像使用鼠标一样使用它(这意味着我从代码中单击界面)。
Basically what I'm trying to do is automate some redundant tasks I do often, just I don't know how it's done, or even how it's called. 基本上,我想做的是使我经常执行的一些冗余任务自动化,只是我不知道它是如何完成的,甚至不知道它是如何被调用的。 Anyone can point me in right direction?
任何人都可以指出正确的方向吗?
Thanks! 谢谢!
Forget about "automated clicking". 忘记“自动点击”。 GUI tools are just front-ends to control the system.
GUI工具只是控制系统的前端。 You can control the system like they do, it will be much easier.
您可以像他们一样控制系统,这会容易得多。
Huge possibilities can give you Microsoft Management Console . 巨大的可能性可以给您Microsoft管理控制台 。 Each "snap-in" can be accessed via COM model.
可以通过COM模型访问每个“快照”。 Some of them have GUI front-ends, find and fire "*.msc" files (somewhere in Windows directory) to try them.
其中一些具有GUI前端,查找并启动“ * .msc”文件(在Windows目录中的某个位置)以尝试使用它们。
There is many command line tools ie "net" command has huge abilities related to networking. 有许多命令行工具,即“ net”命令具有与联网相关的强大功能。
PowerShell may be a better choice instead of C# or C++, it's designed for task automation. 相比 C#或C ++, PowerShell可能是更好的选择,它是为任务自动化而设计的。 You can easily use COM, .NET, MMC ...
您可以轻松使用COM,.NET,MMC ...
Windows Explorer has a COM object model that you can call from both C# and C++. Windows资源管理器具有一个COM对象模型 ,您可以从C#和C ++中调用它。 (Most of the examples on MSDN are in Javascript or VBScript, which I guess aren't your languages of choice, but they demonstrate that the API is straightforward to call.)
(MSDN上的大多数示例都使用Javascript或VBScript,我猜不是您选择的语言,但是它们证明了该API易于调用。)
AutoHotKey是专门为此类任务设计的脚本环境
If you want mostly to launch control panel you can do using RunDll32 interface existing in the most control panel applets. 如果主要希望启动控制面板,则可以使用大多数控制面板小程序中存在的RunDll32界面。 See http://www.osattack.com/windows-7/huge-list-of-windows-7-shell-commands/ , http://support.microsoft.com/kb/167012 or http://www.winvistaclub.com/t57.html for example.
见http://www.osattack.com/windows-7/huge-list-of-windows-7-shell-commands/ , http://support.microsoft.com/kb/167012或HTTP:// WWW。例如, winvistaclub.com / t57.html 。 For the corresponding API see http://support.microsoft.com/kb/164787 .
有关相应的API,请参见http://support.microsoft.com/kb/164787 。
Another option is usage of control.exe (see http://msdn.microsoft.com/en-us/library/cc144191.aspx and http://vlaurie.com/computers2/Articles/control.htm ). 另一个选择是使用control.exe(请参阅http://msdn.microsoft.com/zh-cn/library/cc144191.aspx和http://vlaurie.com/computers2/Articles/control.htm )。
If you google more you will find much more examples which you can to automate a lot of things without using of some general ways to automate GUI. 如果您在Google上搜索更多,则会发现更多示例,可以使许多事情自动化, 而无需使用一些使GUI自动化的常规方法。
At more or less the lowest level within Win32, you can use the SendMessage() API to send raw click messages to windows of interest. 在Win32或多或少的最低级别,您可以使用SendMessage() API将原始的点击消息发送到感兴趣的窗口。 This will rely on a lot of intrusive knowledge about the apps you intend to drive.
这将取决于您打算驱动的应用程序的大量侵入性知识。 However, you could easily implement a "click recorder" that could replay click sequences captured from user interaction.
但是,您可以轻松实现“点击记录器”,该记录器可以重播从用户交互中捕获的点击序列。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.