Can't record very easy script

I can’t get the recorder to do what I want. Maybe someone can help.

Start an app, “TN”
Enter text “keynote” in the field that is already highlighted when the app opens
Click the box that says “Start Service” (which is already highlighted)

Then stop accepting input.

Thanks

The recorder doesn’t work very often because an application needs to be written specially for the recorder to work… and unfortunately not many applications are written like that. You can do what you want with a couple commands though. Try this:

tell application "TN" to activate
tell application "System Events"
	tell process "TN"
		delay 0.2
		keystroke "keynote"
		delay 0.2
		keystroke return
	end tell
end tell