How do you set the front window?

I’m trying to script a Call of Duty Server that I’m hosting from my intel computer. I want the program to select the server window on my desktop titled “Call of Duty Console” and type in the text field, “Welcome to the Xr clan server!” I want this message to be typed every 15 minutes. There are a few things i need:
1.) How do you set the front window to another window whose title I know?
2.) How do you tell system events (or whatever you have to tell) to type/simulate an actual keystroke?
Once these questions are answered I am imagining the script looking somewhat like:

repeat
set front window to window whose title is “Call of Duty Console”
tell application “System Events”
keystroke “Welcome to the Xr clan server!”
keystroke “ENTER”
end tell
delay (60 * 15)
end repeat

Brodeur235

I can’t test this of course, but something like this:

tell application "System Events"
	tell window "Call of Duty Console" of process "YourServerProcessNameHere" to perform action "AXRaise"
	keystroke "Welcome to ..."
	keystroke (ASCII character 3) -- the Enter key
end tell