Find process by name and insert commands

I am writing a tcsh script that will open an already-running processs on a system, and give it a command. I want to have something similar to this:

http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-process-in-unix-or-linux-systems/

But I need to be able to find the process and insert the command, either kill or something else, all in one line.

I'm thinking it would look something like this:

ps -ax | grep <process> | <now what?>

Please reply soon, as I need to get this to work quickly, though I am not at all sure what to do.

When you say give it a command, I believe you mean send it a signal, you can send signals via kill with the appropriate number as a flag eg.

kill -$SIGNAL_NUMBER $(ps ax | grep firefox-bin|grep -v grep |awk '{print $1}')

Or using the example you provide

kill -$SIGNAL_NUMBER $(pidof firefox-bin)

That said, despite your haste, you should have a read of TLDP IPC guide

Having seen the guide, I don't think sending a signal is what I need.
Here is the basic situation:
User A launches a process.
User B is logged in to the same system and needs to access the process to give it a command (what the script is for). Acceptable commands are start, stop, pause, and kill, kill ending the process entirely, while the other commands give it specific instructions.
Although from the format of your answer, it sounds like this should work:

start $(pidof <process>)

Or can that only be done with kill?

How would User A give these commands to the process?

User A starts seeing this:
prompt>
User A starts the process:
prompt> <process>
User A gives any of the aforementioned commands to the process:
prompt/process> <command>

It sounds as though your process is going to have to have a signal handler so that the user B can send various signals (note that a signal handler can do whatever it likes when it receives any signal except SIGKILL(9) or you could implement a "management" shell that user B can log into and issue commands to the process on.