Simple AutoHotKey Script for in-game text call outs/custom messages

Simple script that you can paste into a notepad and run w/ AHK. It is by no means perfect, it took me an hour to make.

What the script can do: A script that can toggle on and off with a key bind, that allows you to add a message in game. I had originally wanted to have it say “bomb” or “bombing out” when pressing 5 in game. However the functionality of that code was subpar.

I have never created a mod, but that might change. I wanted more functionality in the game I.e. being able to call out bombs in game without push to talk, or character voice animation.

The code is simple. If you copy-pasta, F1:: (you can change it to whatever key you want). Allows you to activate and de-activate the script while AHK runs. As it states in the name, it is a toggle.

XButton2:: is mouse button 5/forward button on a mouse. (You can change it too)
Keep in mind that this inputs the information into the game. So if it is a long message. You can expect a slight delay in your character. Pressing AWSD can add in, or even replace a character. I.E. DOOM. This doesn’t happen often, and can be offset by jumping. Again its a very short delay at 4 characters.

F3::
Same as F1, but a longer message. As w/ F1::, you can put your own custom text in, keep in mind the longer the message, the longer it takes for the it to get entered into the game.


f1::suspend, toggle

XButton2::
{
Send, {Enter 1}
Send, BOOM `n
Send, {Enter 1}
Send, {Enter 1}
}
return

f3::
{
Send, {Enter 1}
Send, Hey just a heads up, when you see me type “BOOM” I am in the process/going to throw a bomb. `n
Send, {Enter 1}
Send, {Enter 1}
}
return


If I had to improve upon the code, I would have it ignore the any other key inputs of pre-determined message by directly injecting into the game via the UI mod. Not even sure if that is possible on our end. That way it could bypass the message input delay and avoid any additional keys that were pressed from ending in your message.

Things I might try doing, making a sanctioned UI mod to display network information of you underneath the FPS counter. Would be nice to have.

Reason for the edits, grammatical fixes + using block quote to clean up the appearance of the code.

1 Like