是否有适用于 Windows 10 的 SendKeys 类的替代方案 [英] Is there an alternative for the SendKeys class that will work with Windows 10

查看:44
本文介绍了是否有适用于 Windows 10 的 SendKeys 类的替代方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在任何地方都找不到任何明确的信息,但 System.Windows.Forms.SendKeys 类似乎在 Windows 10 中被阻止/禁用/折旧.

I cannot find any definitive information anywhere but the System.Windows.Forms.SendKeys class appears to have been blocked / disabled / depreciated in Windows 10.

我编写了一个演示程序来监视用户的击键,如果用户输入已知代码,它会弹出一个表单,然后转到文档数据库并返回各种字符串(公司名称/地址/联系人列表等)和用检索到的字符串替换键入的代码.SendWait 用于将检索到的字符串发送到输入代码的任何程序.

I wrote a demo program that monitors the users keystrokes and if a user enters a known code it will pop up a form and then go off to a document database and return various strings (company names / addresses / contact lists etc) and replace the typed code with the retrieved string. SendWait is used to send the retrieved strings to whatever program typed the code.

我在公司的 Windows 7 桌面上构建了该程序,但是当我在我的个人 Windows 10 系统上运行它时,它不起作用.后来读了很多书,我觉得自己是个彻头彻尾的白痴,但我不能让他们进一步研究这个项目,因为他们不会永远使用 Win7.

I built the program on the companies Windows 7 desktops but when I ran it on my personal Windows 10 system it didn't work. A lot of reading later and I feel like a complete idiot but I cant let them take this project any further knowing that they wont be on Win7 forever.

所以我的问题是在 Windows 10 中是否确实禁用了此类功能,或者是否有另一种方式或方法可以用来实现将文本插入正在运行的程序中的这种行为.

So my question is has this sort of functionality definitely been disabled in Windows 10 or is there another way or method I would be able to use to achieve this behavior of inserting text into running programs.

任何帮助表示赞赏.

推荐答案

我发现了这个论坛主题:

I found this Forum-Thread:

https://www.tenforums.com/software-apps/49635-sendkeys-not-working-windows-10-a.html

SendKeys 在 W10 中被阻止.在 W8.1 中它仍然有效.
还有其他烦人的事情,例如不允许 App 读取或 Wright 驱动 C.文件"在那里,但 W10隐藏"了它或根本不允许访问它.
也有网络问题,不允许应用程序在局域网环境下工作.
好吧,我的观点是 W10 对用户 PC 的行为就像恶意软件.无用.

SendKeys is Blocked in W10. In W8.1 it still works.
There are other anoying things, like not allowing App to Read or Wright to Drive C. The "file" is there but W10 "hides" it or simply not allowing to access it.
There are Netwok problems also, not allowing App to work on LAN environement.
Well, my opinion is that W10 behaves like Malware to user PC. Useless.

他们没有解决办法.

这篇关于是否有适用于 Windows 10 的 SendKeys 类的替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆