的SendKeys或SendTextEntry到游戏 [英] SendKeys or SendTextEntry to a game

查看:183
本文介绍了的SendKeys或SendTextEntry到游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打一个程序来节省一些服务器的IP地址,并使用其中之一,每当用户想使用它。

I want to make a program to save some server IP addresses and use one of them whenever the user want to use it.

和本场比赛并没有复制粘贴命令支持。所以玩家必须通过键入IP地址,如果他想加入到另一台服务器上浪费时间。

And the game does not support to the copy paste command. So player have to waste time by typing IP addresses if he wants to join to another server.

我想我的程序在游戏中,当用户按下F12键在IP地址框中键入地址。 F12的keydown是使用keyhook类没有任何问题抓获。

I want to make my program to type the address in the IP address box in the game when user pressed the F12 button. F12 keydown is captured using a keyhook class without any problem.

问题是游戏不要么送键或CodePlex上InputSimulator级响应。 (我试过用SendKey类发送每个号码,并试图用InputSimulator发送TextEnry)。我怎样才能做到这一点?唯一游戏捕捉键盘按键。反正是有使信号键盘发送到计算机时,用户按下一个按钮?

The problem is game does not respond to either the SendKeys or CodePlex InputSimulator class. (I've tried to send each number using SendKey class, and tried to send TextEnry using InputSimulator). How can I do this ? The only thing game capture is keyboard keys. Is there anyway to make signals the keyboard sends to the computer when user pressed a button ?

这是本场比赛是微软最后一战CE(定制版)的方式

By the way the game is Microsoft Halo CE (Custom Edition)

感谢您

推荐答案

如何移动光标或模拟点击其他应用程序?

看Pietu1998的约uiaccess答案

see Pietu1998's answer about uiaccess

在您的项目上右键单击并做添加 - >新项

Right click on your project and do "Add-->New Item"

选择应用程序清单文件

变化:

<requestedExecutionLevel level="asInvoker" uiAccess="false" />



to:

<requestedExecutionLevel level="asInvoker" uiAccess="true" />

这篇关于的SendKeys或SendTextEntry到游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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