ID:1556742
 
Keywords: command, execute, input, proc
(See the best response by Kaiochao.)
Problem description:

Hey, is there a way to execute a proc when a user types any command into the input bar, and submits it?
A verb is a special type of proc that can be accessed by the user. That is the default behavior of the input bar. When you go into the interface file (if you create one) there is an option that says "Don't use this for commands", if that is checked, un-check it.

You could also add procs to the verb list to allow this.
No I just want it to call an "on_command" proc whenever someone types a command so I can update their interface if they accessed the verb through a macro; to allow them to use T to talk and then enter to continue having focus on the game map.
Best response
client/Command() might be what you're looking for.
Nah that's for invalid commands, I want either valid or both.
Using what Kaiochao posted, you can parse it to do as you're wanting.
It only gets called when someone executes an invalid command, I want both valid and invalid.
In response to Giacomand
Giacomand wrote:
It only gets called when someone executes an invalid command, I want both valid and invalid.

Then yes, then you'll want to use what Kaiochao posted since you're dealing with procedures.
But it only gets called when someone tries to execute an invalid command/verb.
In cases where you use client/Command() you wouldn't want to be using verbs at all. If you're trying to use both verbs and command input you'd have to write a parser for it.
I think I know what you mean. Everyone else seems to be having a hard time understanding what the problem is. By default, input text is run through a built-in parser, to check for commands, so most of the time, client/Command() never even gets called.

However, you can easily create a loophole to force Command() to be called every time text is entered in a specific input. You just have to make Command() itself the default command. However, this will also prevent the input from being used for any other command. This just means that you can no longer rely on the built-in command parser, and you will have to parse all text yourself. This isn't a bad thing though, since it's a more polished direction to take things, and one that I prefer myself.

Here is all you need to get started:
client
// This must be defined, or you will get
// the "Unrecognized or inaccessible verb" error.
Command(command as command_text)
// parse commands here

mob
Login()
..()
// Set the input's command param to Command,
// the name of the built-in proc:
winset(usr, "input", "command=\"Command \\\"\"")

By forcing all text to pass through client/Command(), you can then do whatever you want with it. It gives you full control, so you can make whatever command syntax you want. Now you can use the input for chat, for commands, for both, or whatever you want to use it for.

Some things in DM are turned completely inside-out by default, and just don't work the way you want them to out of the box, but that can be fixed with libraries.

I hope this helps. The solution or workaround (however you want to look at it) isn't a very obvious one.