Sorry guys, I'm probably being a massive pain in your side, but I always try google before this and search for stuff. Anyway, I have SendMessage defined and everything, but I can't find a decent example of how to use it in a function.
Someone said to try this, but I'm not sure what to do with it, I'm hoping to use this to send messages into the console of the game im using to execute commands.
EDIT:I want to use this to be able to say commands in the game such as !place and have the utility send a message into the game such as place misc_model_breakable 0 model,map_objects/factory/f_con1,spawnflags,1
so basically, the person says !place and it sends the above command into the game.
ammm what? As before, more explenation would be awesome. For what I understand, you want either one of two things.
1) You want to have a message displayed to a user in some way, I do think a messagebox is the best way for you (if your making a win32 application) 2) You want to have a command given to the game as it loads, same way it does for a short-cut executer. Like WarCraft for an example. Make a shortcut to the .exe and add -windowed at the end will make the game play in window mod.
P.S: As before I assume you use C#. But seriosly, more info. I am no psychic (don't know about any one else, I'm pretty sure they are not psychic also.)
Re: A few questions
Posted: December 13th, 2011, 9:49 pm
by owner123
First, you're not being a pain. We all signed up for this, we're not being forced to help. You want to send commands into an external application? Best way to do this is the SendKeys.Send method. Here's an example.
This will send the keys "Hello Durge" to the application you have open and focused. It will be just like you typing the keys on the keyboard. However if you want to send commands to WC3 you need to send new lines too (the return key) You do this like: