- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我想弄清楚如何将字符“^”(不是 CTRL 命令)发送到外部文本窗口。
我试过的不同代码:
SendKeys.SendWait("^");
SendKeys.SendWait("(^)");
Sendkeys.SendWait("{^}"); //This should be the right code, but it doesn't work either
这些都不会在文本字段中输入字符“^”。如果我将普通文本发送到窗口,它就会出现在窗口中。 “^”无法以某种方式输入。我查看了 MSDN 和联机帮助,但找不到任何接近该问题的内容。有什么想法吗?
最佳答案
要使用 SendKeys.SendWait()
发送字符“^”,您需要考虑实际按下的是哪些键。在 en-US 键盘上,它是 Shift & 6,转换为:
SendKeys.SendWait("+6");
因此,无论您使用哪个组合键生成“^”字符,请将这些组合键输入到 SendKeys.SendWait()
调用中。
关于c# - SendKeys.SendWait 函数 - 向应用程序发送特殊 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16220666/
我正在尝试制作一个将 key 发送到外部应用程序的应用程序,在本例中为 aerofly FS。我以前成功使用过 SendKeys.SendWait() 方法,但是这一次,它并没有完全按照我想要的方式工
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.C
我想在后台从我的应用程序中复制事件应用程序中的选定文本。我使用 SendKeys.SendWait()。但我有时会遇到一个问题:一段时间后,我的应用程序只发送“c”而没有“CTRL”(至少只有“c”进
在 C# 中是 SendKeys.SendWait("{TAB}"); java中那是什么? (发送 TAB 键击)? 我在java中找不到真正的答案,java文档也不知道我在问什么。 (我注意到条款
SendKeys.SendWait() 只是一个包装器,这两个代码片段是相同的吗? const int VK_ESCAPE = 0x1B; keybd_event(VK_ESCAPE, 0, 0, 0
我正在尝试在 C# 中执行以下操作: 打开一个新进程(notepad.exe) 输入一些文本(使用 SendKeys) 关闭记事本(处理任何确认对话框) 这是我得到的 Process p = new
我想弄清楚如何将字符“^”(不是 CTRL 命令)发送到外部文本窗口。 我试过的不同代码: SendKeys.SendWait("^"); SendKeys.SendWait("(^)"); Send
我正在使用 SendKeys.SendWait 向其他正在运行的应用程序发送击键。但如果目标应用程序没有最小化,它就不起作用。这种方法有什么问题吗?将击键发送到正在运行的应用程序的其他方法有哪些。 我
我想知道如何使用 SendKeys.send(); 发送 空格键它可以与其他键一起使用,但只能与空格键一起使用!! 这是我找到其他键的链接 http://msdn.microsoft.com/en-u
我试图在按下 C 的同时按住 CTRL,但无法正常工作。我读过 SendKeys Class但是,它仍然不起作用。 这就是我尝试过的: SendKeys.SendWait("^C"); SendKey
我编写了一个程序来将“Enter”键发送到某个事件窗口。我使用 Timer 获取当前事件窗口的标题并采取相应行动。我做了一个错误日志文件,所以我可以跟踪所有的错误。这是造成错误的代码: pri
我的表单上有一个 Timer 控件,带有以下 Tick 事件处理程序: private void timer1_Tick(object sender, EventArgs e) { forea
我是一名优秀的程序员,十分优秀!