Installed InputSimulator via NuGet, no members accessible(通过 NuGet 安装 InputSimulator,没有成员可访问)
问题描述
在 Visual Studio 2013 中,我安装了一个名为InputSimulator"的 C# 包.这样做之后,我看到一个名为WindowsInput"的新引用被添加到我的项目中.(即 WindowsInput.dll)
In Visual Studio 2013, I installed a C# package called "InputSimulator." After doing so, I see a new reference get added to my project called "WindowsInput." (i.e., WindowsInput.dll)
问题在于,codeplex 网站谈到的所有方法都无法访问.如果我尝试:
The problem is that none of the methods that the codeplex site talks about are accessible. If I try:
InputSimulator.SimulateTextEntry("Say hello!");
我得到错误:
Error 14 'WindowsInput.InputSimulator' does not contain a definition for
'SimulateTextEntry' Blah.cs 33 32 ALibrary
我确实有 using WindowsInput
作为指令.
I do have using WindowsInput
as a directive.
有谁知道为什么这些方法无法访问?SimulateKeyPress()
等方法也不可用.这些是关键 API.我是否缺少有关添加此库和引用它的内容?
Does anyone know why the methods are not accessible? Methods like SimulateKeyPress()
are also not available. These are the key API. Am I missing something about adding this library and referencing it?
推荐答案
所以我只是尝试了这个lib.实际上,他们的文档只是有点偏离.你需要先创建一个 InputSimulator 的实例,像这样:
So I just tried this lib. Actually their documentation is just a little off. You need to create an instance of InputSimulator first, like this:
InputSimulator s = new InputSimulator();
s.Keyboard.TextEntry("Hello sim !");
这篇关于通过 NuGet 安装 InputSimulator,没有成员可访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:通过 NuGet 安装 InputSimulator,没有成员可访问


- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 输入按键事件处理程序 2022-01-01