Posted on 2011-10-29
Medium Priority
Last Modified: 2012-06-21
Hi there. I need to know how to send a text to the game (window). Game is called Heroes Of Newerth.

Question by:AlexeyTimofeev
  • 2
  • 2
LVL 10

Expert Comment

ID: 37049859
You have to make the application active first then use

SendKeys.Send("Your Text here")

full example can be found here

Author Comment

ID: 37049866
It is a game that uses DirectX. Does that change anything?

Author Comment

ID: 37049876
What I'm trying to do is.. my program is getting some information relevant to the player and when player types the command my program should respond by sending message to the actual game. as I said games name is Heroes Of Newerth. It uses DIRECTX. Program should be able to send that message when game is focused or even if it's not.
LVL 10

Accepted Solution

honestman31 earned 2000 total points
ID: 37049948
I don't know this game , but I know you cannot send any information ( Text )  while the application is not focused ( unless the the application itself allow API calls, Which I  doubt ) ,
in many cases you have to place the the application in certain place on your desktop and click inside the text box in the game itself then use sendkeys ,
I ran into such a problem while I was trying to send some information to a JAVA application , and it is end up to use Autoit3 ( google for it )   + VB as well
Autoit3 was used to make the JAVA application active and click on the place I want to insert text to , then VB will send the text .

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 1 hour left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question