In EverQuest II the chat box is also activated by the {enter} key. I know in that game the input is also terminated by an {enter} so any messages to the chat box take the form.
{enter}This is the message to be sent{enter}
Depending on which chat that the message needs to be sent to there is also a command of the form /say or /s or /p (for party chat} or /r (for raid chat. So a generalized send to the say channel is then modified by
the command as in...
{enter}/s This is the message to be sent{enter}
to bind that to the 2 key you'd use
Code:
2::
Send {enter}/s This is the message to be sent{enter}
sleep 200
Return
Also one must be careful to make sure the proper window is active as well. If you're anything like me, when you're playing, you're running in windowed mode with several other info windows open for reference such as a game wiki window, one or more script window gui's and maybe a notepad or calculator and possibly a pdf game aid file. So I generally make sure my game window is activated when I send a hotkey. I make a practice of setting that at the beginning of my script.
Code:
SetTitleMatchMode, 2
gamewindow = EverQuest II
2::
WinActivate %gamewindow%
Send {enter}/s This is the message to be sent{enter}
sleep 200
Return
Finally, since many of my fight keys are bound to the game hotbars 1-9, alt1-alt9, and ctrl1-ctrl9. I bind my numpad keys to any numbersets i need for special functions. The end result then generally becomes...
Code:
SetTitleMatchMode, 2
gamewindow = EverQuest II
*Numpad2::
*NumpadDown::
WinActivate %gamewindow%
Send {enter}/s This is the message to be sent{enter}
sleep 200
Return
*Numpad3::
*NumpadPgDn::
WinActivate %gamewindow%
Send {enter}/s This is another message to be sent{enter}
sleep 200
Return
Hope this helps.