Services

Hey guys!. I’m trying to make an applescript that sends rcon commands to a server (call of duty 1) it can be done through the services menu Services/Call of Duty MP/Send command, how can I applescript this? am I using the wrong language to make this?

I’ve seen you can do it with cocoa, but I don’t know cocoa. Does anyone know?
Heres how I am currently doing it

tell application "Epecaf Launcher"
	activate
end tell
tell application "System Events"
	keystroke "192.168.1.101"
	keystroke tab
	keystroke "28960"
	keystroke return
	delay 3
	keystroke "r" using {command down}
	keystroke "say |^1JCon^3Tools^20.1|-^7JDogg logged in"
	keystroke tab
	keystroke "weinvade"
	keystroke return
	delay 5
	keystroke backspace
end tell
end

Epecaf launcher is an application that can send rcon commands to a server, so I’m using that along with system events to enter keystrokes